Welcome to The Wholesale Forums!
: :


Copying a search menu


Reply
 
LinkBack Thread Tools Display Modes



Posts: 485
Offline

Join Date: May 2005
Feedback: (0)
Thanked: 0 Times in 0 Posts
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
#1  
Reply With Quote Old 12-08-2005, 02:39 PM



Posts: 4,884
Offline

Join Date: Sep 2003
Location: Cheshire, UK
Feedback: (0)
Thanked: 0 Times in 0 Posts
It uses the script "showcategory.php" which presumably accesses a database containing information from your site.
#2  
Reply With Quote Old 12-08-2005, 04:02 PM



Posts: 485
Offline

Join Date: May 2005
Feedback: (0)
Thanked: 0 Times in 0 Posts
Thanks for the reply Martin.

So does that mean i would need to copy some code from the "showcategory.php" file and not copy anything from the code i've posted. This code is basically a part of the code from the search menu section of my index.php, and thought that i could just copy that as i need to duplicate the search option (just a guess though, i'm by no means a php whizz ).
#3  
Reply With Quote Old 12-08-2005, 04:11 PM



Posts: 4,884
Offline

Join Date: Sep 2003
Location: Cheshire, UK
Feedback: (0)
Thanked: 0 Times in 0 Posts
I use this: http://www.picosearch.com/
#4  
Reply With Quote Old 13-08-2005, 06:01 PM

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:10 AM. Fixed Width