dooper3 Posted May 9, 2006 Share Posted May 9, 2006 I have a simple script to enable administrators to search a MySQL database for a person's surname. The script works fine in Firefox and displays the data as it should, but when you click "search" in IE6, it does not return anything except the search form again.Below is the code for my search form:[code]<?echo (" <link type=\"text/css\" rel=\"stylesheet\" href=\"style.css\"> <form action=\"$php_self\" method=\"post\"> <table class=\"formtable\" align=\"center\"> <tr><th colspan=\"2\">Search for a Club Member</th></tr> <tr><td><input class=\"form\" name=\"findphrase\"></td><td><input class=\"form\" type=\"submit\" name=\"find\" value=\"search\"></td></tr> </table> </form> ");if (isset($_POST["find"])) { $term = addslashes($_POST["findphrase"]); echo ("You searched for \"$term\"<p>"); include("db_connect.php"); $sql = mysql_query("SELECT * FROM memberdata WHERE surname LIKE '%$term%'") or die ("Could not query the database"); $num = mysql_numrows($sql); if ($num > 0) { echo ("Found $num results<p>"); while ($row = mysql_fetch_array($sql)) { extract($row); echo ("<a href=\"members.php?choosemember=$uniID\" title=\"$forname $surname\">$forname $surname</a><br>"); } mysql_close(); } else { echo("No results found for that term, please try again"); }}?>[/code]Any help much appreciated!! Link to comment https://forums.phpfreaks.com/topic/9402-simple-but-confusing-issue/ Share on other sites More sharing options...
trq Posted May 9, 2006 Share Posted May 9, 2006 Change...[code]if (isset($_POST["find"])) {[/code]to...[code]if (isset($_POST["findphrase"])) {[/code] Link to comment https://forums.phpfreaks.com/topic/9402-simple-but-confusing-issue/#findComment-34641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.