Copying a search menu - The Wholesale Forums
 
 
 
Home  |  Register  |  Members  |  Calendar
Welcome to The Wholesale Forums! All times are GMT +1. The time now is 03:31 PM.

Old 12-08-2005, 03:39 PM   #1
Broomy
Community Member
 
Broomy is offline

Join Date: May 2005
Posts: 485
iTrader: (0)
Thanks: 0
Thanked: 0 Times in 0 Posts

Default

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

Reply With Quote
Old 12-08-2005, 05:02 PM   #2
Martin
Community Member
 
Martin is offline

Join Date: Sep 2003
Location: Cheshire, UK
Posts: 4,884
iTrader: (0)
Thanks: 0
Thanked: 0 Times in 0 Posts

Default

It uses the script "showcategory.php" which presumably accesses a database containing information from your site.

Reply With Quote
Old 12-08-2005, 05:11 PM   #3
Broomy
Community Member
 
Broomy is offline

Join Date: May 2005
Posts: 485
iTrader: (0)
Thanks: 0
Thanked: 0 Times in 0 Posts

Default

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 ).

Reply With Quote
Old 13-08-2005, 07:01 PM   #4
Martin
Community Member
 
Martin is offline

Join Date: Sep 2003
Location: Cheshire, UK
Posts: 4,884
iTrader: (0)
Thanks: 0
Thanked: 0 Times in 0 Posts

Default

I use this: http://www.picosearch.com/

Reply With Quote
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

Forum Jump


All times are GMT +1. The time now is 03:31 PM.

Control Panel
Member Login:
Quick Navigation
Register
Advertising
FAQs
Member of the Month
Top Contributors
User Agreement
Contact Us
Advertisement
Member of the Month
TWF - Member of the Month AwardNovember 2009
PCDropship
Popular Discussions
Long Working Hours?
eBay/PayPal Phone No's
Taxable Profits?
Startup Checklist?
Amazon the new eBay?
Useful Articles
Qualify China Suppliers
Dealing with the Chinese
Sourcing Products Abroad
UK VAT and Import Duties
Approaching Wholesalers
Newsletters
TWF Newsletter - July 08
TWF Newsletter - June 08
TWF Newsletter - Nov 07
Archived Newsletters
Forum Guides
Leaving iTrader Feedback
Reporting a Post
Competitions
Business Article Writing 08
Fantasy Football 2008/9
Resources
The Wholesale Directory
Top  |  Profile  |  Calendar  |  Archive  |  Advertise  |  Contact
Our Network: Wholesale Forums  |  Wholesale Products and Suppliers Directory  |  Wholesale Business Blog and Resources  
Powered by vBulletin® Version 3.8.4 | Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
© All Rights Reserved. The Wholesale Forums 2004-2009, All Rights Reserved.