87dave87 Posted September 22, 2006 Share Posted September 22, 2006 http://www.emulators.cc/search.phpOn the results page nothing is appearing.The coding for the search page is: -[code]<form name="emusearch" method="POST" action="searchresults.php"> <p> <input type="text" name="emusearch" size="20"><input type="submit" value="Submit" name="emusearch"></p></form>[/code]The coding for the results page is: -[code]<?php $database="mydatabase"; mysql_connect ("localhost", "user", "pass"); @mysql_select_db($database) or die( "Unable to select database");$sql = mysql_query("select * from windows_atari2600 where emulator = '$emusearch'");if(isset($sql)){while ($get_info = mysql_fetch_row($sql)) { echo "<tr>"; foreach ($get_info as $field) echo "<td>$field</td>\n"; echo "</tr>\n";}}else{ echo "<tr>"; echo "We cannot find your infomation."; echo "</tr>\n";}?>[/code] Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted September 22, 2006 Share Posted September 22, 2006 i think i have replied to this b4 you do not get the posted info just by say $emusearchhere is how it should be ...[code]<?php $database="mydatabase"; mysql_connect ("localhost", "user", "pass"); @mysql_select_db($database) or die( "Unable to select database");$sql = mysql_query("select * from windows_atari2600 where emulator = '$_POST[emusearch]'");if(isset($sql)){while ($get_info = mysql_fetch_row($sql)) { echo "<tr>"; foreach ($get_info as $field) echo "<td>$field</td>\n"; echo "</tr>\n";}}else{ echo "<tr>"; echo "We cannot find your infomation."; echo "</tr>\n";}?>[/code] Quote Link to comment Share on other sites More sharing options...
87dave87 Posted September 22, 2006 Author Share Posted September 22, 2006 yes that works now, but the 'cannot find information' part is still not working. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted September 22, 2006 Share Posted September 22, 2006 try this i dont know if it will work[code]<?php $database="mydatabase"; mysql_connect ("localhost", "user", "pass"); @mysql_select_db($database) or die( "Unable to select database");$sql = mysql_query("select * from windows_atari2600 where emulator = '$_POST[emusearch]'");if($sql==""){while ($get_info = mysql_fetch_row($sql)) { echo "<tr>"; foreach ($get_info as $field) echo "<td>$field</td>\n"; echo "</tr>\n";}}else{ echo "<tr>"; echo "We cannot find your infomation."; echo "</tr>\n";}?>[/code] Quote Link to comment Share on other sites More sharing options...
87dave87 Posted September 22, 2006 Author Share Posted September 22, 2006 No doesn't seem to, just displays 'We cannot find your infomation' no matter what is entered :? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.