Hello, Thanks for the quick response.
MrAlaska, I changed the $result to $search_result. No change.
I also took out the @. It came up with a invalid MySQL result resource. On
while ($row =@ mysql_fetch_array($result))
but there was no error message in the line above with the @ taken out.
Sarahk, I tried your code, But got the same results. I've used this echo code in other parts of my site, and it works fine.
I have not tried the HTTP_POST_VARS yet. I have the most recent version of PHP4.
My code must have the problem in the main site or the query part. I can't seem to figure this one out. Thanks again for the help, any other suggestions?
Here is my updated code
/Here is my main page
<form action="search.php" method="post">
<input type="text" name="searchstring" cols="10">
<input type="submit" value="GO" />
</form>
/Here is my search.php
<?php
include ("startmarket.php");
$search_result = mysql_query ("SELECT * FROM products WHERE product_name LIKE '%$searchstring%' ");
while ($row = mysql_fetch_array ($search_result))
{
echo "<a href=\"" . $row["url"] . "\"><img src=\"" . $row["imagefile"] . "\" border=0 alt=\"" . $row["name"] .
"\"></a><BR>";
echo "<b>" . $row["name"] . "</b><br>";
echo $row["description"] . "<br>";
echo "<b>Price: $</b>";
echo "<b>" . $row["price"] . "</b><br><hr /><br>";
}
?>
Jeremy