I've a site that has a search box that searches classified ads from my site, but i'm adding some other pages which already has a search menu (doesn't do anything at the moment, it just looks like a search box!) but doesn't have the code that will search the database for the correct results. Does anyone know from the following code which parts i need to add on my other pages so it will search in the same way.
p.s. Please let me know if you don't know what i mean, i've confused myself while typing this!
Code:
<table width="100%" border="0" cellspacing="10" cellpadding="2">
*<tr>
* *<td valign="top"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="onepxtable">
* * * *<tr>
* * * * *<form name="form2" method="post" action="showcategory.php">
* * * * * *<td align="center" valign="middle" class="innertablestyle">
<input name="keyword" type="text" size="40">
* * * * * * * <select name="cid">
* * * * * * * *<option value=0 selected >Any category</option>
* * * * * * * *<?
* * $cats=mysql_query("select * from sbclassified_categories where pid=0 order by cat_name");
* * * * * *
* * * * * if(!isset($cokvgiqp))
{ die();} *
* * *while($rst=mysql_fetch_array($cats))
* * {
* * * * ?>
* * * * * * * *<option value="<? echo $rst["id"]; ?>" <? if($rst["id"]==$cid) echo " selected ";?>
* * * ><? echo $rst["cat_name"]; ?></option>
* * * * * * * *<?
* *****}//end while
* * *?>
* * * * * * *</select> <font class='normal'>
* * * * * * *<input name="show_save" type="hidden" id="show_save" value="yes">
* * * * * * *</font> <input type="submit" name="Submit" value="Search">
* * * * * * *Advanced Search
* * * * * *</td>
* * * * *</form>
* * * *</tr>
* * *</table></td>
*</tr>
Thanks in advance