Hey guys, i am having problems while searching for members on my website.. i have a form that users fill in before being able to click on a 'search' button.. which works and the code is:
<form method = "POST" action="searchName.php" onSubmit="returnverifyform(this)">
<br>First name: <input type ="text" name = "first">
<font color = "black"></font>
<br>Last name: <input type = "text" name = "second">
<font color="black"></font>
</select><input type="submit" value = "Search">
it then opens 'searchName.php' which is meant to search through a database that i have created online.. the code is below:
<?php
$connection = mysql_connect("sentinel.cs.cf.ac.uk","scm5sjc",
"num_fud");
$first=$POST['first'];
$second=$POST['second'];
mysql_select_db("sjcdb",$connection) or die("failed!");
echo $first;
echo $last;
$query = "SELECT * FROM info WHERE first='".$first."' AND last ='".$second."'";
echo $query;
$result = mysql_query($query, $connection);
while($row = mysql_fetch_row($result)) {
$title = $row[2];
$first = $row[3];
$last = $row[4];
echo "$title." ".$first." ".$last.";
}
mysql_close($connection);
?>
However, the screen simply is left blank.. any ideas where im going wrong? i am a newbie im afraid so i apologise for any schoolboy errors!!
thanks for your time
steven