Hi - hopefully this is an easy query for any experts out there!
I have a text entry on a form where someone enters a surname they want to search for and when they press the submit button the page should display the results. The page is linked to a table in a phpmyadmin database with following headings - MemberID, Title, FName, LName. The action element of the form is to go to a php page with the following code:
<?php
include "sqlsearchmem.inc";
echo "<table border=1>";
for($i=0;$i<1;$i++){
echo "<tr>";
$row=mysql_fetch_row($result);
for($j=0;$j<1;$j++){
echo"<td>";
echo"$row[$j]";
echo"</td>";
}
echo"</tr>";
}
echo"</table>";
?>
The include file has the SQL which I am struggling with. I have played around with a few variations - do I need to use $_POST somewhere? I need it to search the database for whatever surname is entered in the form and then return the results - can anyone help? Thanks