I have a small search problem
Im using a form consisting of a text box and a button
<form name="form1" method="post" action="products.php?action=3">
<div align="center"><span class="style1">Search</span>
<br>
<input type="text" name="search" width="120">
<input type="submit" name="Submit" value="Go">
</div>
</form>
Once submit is click it runs this code but comes up with no results when it should
if($dothis==3){
$result=mysql_query("SELECT * FROM make, products, type WHERE make.make_id = products.make_id AND type.type_id = products.type_id AND make.make= '$search' AND type.type= '$search'") or die(mysql_error());
echo '<table border="1" bordercolor="black" width="100%" cellspacing="3" cellpadding="3" align="center" rules="rows" frame="hsides">
<tr>
<td align="left" width="15%"><b><font color="#000066">Make</font></b></td>
<td align="left" width="20%"><b><font color="#000066">Product Name</font></b></td>
<td align="left" width="30%"><b><font color="#000066">Description</font></b></td>
<td align="right" width="20%"><b><font color="#000066">Price</font></b></td>
</tr>';
$row=mysql_fetch_array($result, MYSQL_ASSOC);
// Display each record.
echo " <tr>
<td align=\"left\">{$row['make']}</td>
<td align=\"left\">{$row['product_name']}</td>
<td align=\"left\"><a href=\"view_product.php?pid={$row['product_id']}\">Click here for details</td>
<td align=\"right\">£{$row['price']}</td>
</tr>";
Any ideas?