Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/64352-solved-post-not-working/
Share on other sites

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.";
}

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.