hello! am trying to do a simple search engine, but whenever the user types a search term, the script returns the error: unidentified variable: name. name was the input name in the html code. ie (input name="name"). thanks.
<?php
$db = mysql_connect("localhost", "root", "");
mysql_select_db("room_p7", $db);
$query = "select name, course from members where name ='$name'";
$result = mysql_query($query);
while($record=mysql_fetch_assoc($result)){
while(list($fieldname, $fieldvalue) = each($record)){
echo $fieldname."\t".$fieldvalue."\t\t\t";
}
echo "<br><br>";
}
?>