<table align = "left">
<?php
if ($_POST["word"] == "ship" )
{
echo "Your answer is correct.";
}
else
{
echo "Sorry, you typed the wrong answer. Try Again!";
}
?>
<tr>
<td> <span id="dummy" onclick="playSound(this,'vowels/ship.mp3');">
<img src="pics/i.jpg" onmouseover="this.src='pics/vowel/ship.jpg';this.width=200;this.height=250" onmouseout="this.src='pics/i.jpg';this.width=100;this.height=150"/>
 <form action="act_vowel.php" method="post">
 <h2> <font color = "black">  Type the word: <input type="text" name="word"> </h2> </font>
  <input type="submit" name="check" value="Answer">
  </form>
When I run this code. I always get the error that says like this:
  (Notice: Undefined index: word in C:\xampp\htdocs\dyslexia\sample.php on line 15
  Sorry, you typed the wrong answer. ) 
And how can I design the result as the user type the answer? I want it to be more lively. Thanks!
 
     
     
     
     
    