EagleAmerican Posted August 11, 2007 Share Posted August 11, 2007 I just switch hosting and now my search won't work. It uses POST to post the search to my execute_search.php page. I think that this value in php.ini is causeing the problem: max_input_time. It is set to 30.. is that my problem? My previous host had that at -1. Thanks, Adam Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/ Share on other sites More sharing options...
KrisNz Posted August 11, 2007 Share Posted August 11, 2007 No. Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320875 Share on other sites More sharing options...
Foser Posted August 11, 2007 Share Posted August 11, 2007 if you could show us the script quickly we could help you. Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320876 Share on other sites More sharing options...
EagleAmerican Posted August 11, 2007 Author Share Posted August 11, 2007 What could be causing this then? It says that nothing was posted when stuff was posted. Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320877 Share on other sites More sharing options...
EagleAmerican Posted August 11, 2007 Author Share Posted August 11, 2007 I'm pretty sure the code has nothing to do with it because it works on the other host but not on the new one.. but here it is: search.php <form method="post" action="execute_search.php"> <table width=90% align=center> <tr><td>Search for Parasite:</td><td><input type="text" name="search" size="60" maxlength="255"></td></tr> <td></td><td><input type="submit"></td></tr> </table> </form> execute_search.php (I get the message "Please go back and enter something to search for." no matter what. Even if I enter a search. <?php if ($search) // perform search only if a string was entered. { $dbcnx = @mysql_connect('', '', ''); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } $srch="%".$search."%"; $query = "select * from parasite WHERE parasitename LIKE '$srch'"; $result = mysql_db_query("adaarm_db", $query); if ($result) { echo "Search Results:<br><br>"; echo "<table width=90% align=center border=1><tr> <td align=center>Name</td> <td align=center>From</td> <td align=center>Genre</td> </tr>"; while ($r = mysql_fetch_array($result)) { // Begin while $id = $r["id"]; $name = $r["parasitename"]; $from = $r["parasitefrom"]; $genre = $r["parasitegenre"]; echo "<tr> <td><a href=view.php?id=$id>$name</a></td> <td>$from</td> <td>$genre</td></tr>"; } // end while echo "</table>"; } else { echo "Error 8574"; } } else { echo "Please go back and enter something to search for."; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320880 Share on other sites More sharing options...
KrisNz Posted August 11, 2007 Share Posted August 11, 2007 Looks like they have register_globals turned off. You might be able to turn it on in your control panel but you'd be better off rewriting your script to work without globals. eg $search should be $_POST['search']; Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320884 Share on other sites More sharing options...
EagleAmerican Posted August 11, 2007 Author Share Posted August 11, 2007 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-320885 Share on other sites More sharing options...
LiamProductions Posted August 11, 2007 Share Posted August 11, 2007 Try extract($_POST); then you can use your post Quote Link to comment https://forums.phpfreaks.com/topic/64352-solved-post-not-working/#findComment-321011 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.