Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Searching Two Databases
Old 03-14-2007, 05:23 PM Searching Two Databases
Extreme Talker

Posts: 172
Name: Jason
Location: Tennessee
Trades: 1
Ok I currently run my own site with its own database. What I want to do is to add to my search boxes where it could search either my database(the web) or one of our affilate music stores( music) database. Below is the coding for each search box any assistance would be appreciated.

mine
Quote:
<center>
<table style="border-collapse: collapse;" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr> <td colspan="2" align="center"> <input value="1" name="d" type="hidden"> <table style="border-collapse: collapse;" bgcolor="#ffffff" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" width="100%">

<form action="http://www.wespreadtheword.net/cgi-bin/search.cgi" method="GET"> <tbody><tr> <td> <div align="center"> <center>
<table style="border-collapse: collapse;" border="0" bordercolor="#111111" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr><td bgcolor="#4279c4"><p align="center"><font color="#ffffff"><b><font face="Verdana" size="1">
Search<a href="http://www.wespreadtheword.net/" style="text-decoration: none;">
<font color="#ffffff">Christian Search Engine and Christian Directory</font></a> </font></b> <input size="30" name="query"> <input value="Search!" type="submit"></font><b><font color="#ffffff" face="Verdana" size="1"></font><a style="text-decoration: none;" href="http://www.wespreadtheword.net/cgi-bin/search.cgi"><font color="#ffffff" face="Verdana" size="1">Advanced</font></a>
</p>
</td>
</tr> </tbody></table> </center> </div> </td> </tr> </tbody></table> </td> </tr> </tbody></table> </center>
and theirs

Quote:
<table cellpadding=0 cellspacing=0 border=0>
<form action="http://www.musichristian.com/sys/search.php?affcode=lordstryfe" METHOD="POST">
<tr><td><img src="http://www.musichristian.com/images/design/spacer.gif" width=1 height=1></td><td><img src="http://www.musichristian.com/images/design/spacer.gif" width=185 height=1></td><td><img src="http://www.musichristian.com/images/design/spacer.gif" width=1 height=1></td></tr>
<tr><td colspan=3><a href="http://www.musichristian.com/refer/lordstryfe"><img src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_1.gif" width=187 height=26 alt="Search for Christian Music" border=0></a></td></tr>
<tr><td colspan=3><img src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_2.gif" width=187 height=30 alt="Search over 30,000 Christian items by artist, title, or keywords!"></td></tr>
<tr><td><img src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_line.gif" width=1 height=25></td><td background="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_3.gif" width=185 height=25 align=center><table cellpadding=0 cellspacing=0 border=0><tr><td><input maxlength="64" name="search_string" value="" style="text-transform: capitalize;width:144px;height:19;font-family:arial;" size="10"></td><td><img src="http://www.musichristian.com/images/design/spacer.gif" width=5 height=1></td><td><input type=hidden name="category" value="ALL"><input type="image" src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_go.gif" NAME="SEARCH" VALUE="SEARCH" alt="Go" width="19" height="19" border=0 onclick=target="_window"></td></tr></table></td><td><img src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_line.gif" width=1 height=25></td></tr>
<tr><td colspan=3><a href="http://www.musichristian.com/refer/lordstryfe"><img src="http://www.musichristian.com/affiliates/banners/images/mc_searchbox_trans_4.gif" width=187 height=16 alt="Powered by MusiChristian.com" border=0></a></td></tr>
</form>
</table>
__________________

Please login or register to view this content. Registration is FREE
|
LordStryfe is offline
Reply With Quote
View Public Profile Visit LordStryfe's homepage!
 
 
Register now for full access!
Old 03-14-2007, 06:00 PM Re: Searching Two Databases
memberpro's Avatar
Super Talker

Posts: 143
Trades: 0
er... now that code is a mess....

Personally, I would have one form that would include an option radio button that would allow the user to choose which database to search (much like google has).

Post the form to your own script and check the value of the radio button. Use an If statement or switch statement to determine the actions to take. If the radio button is set to search your own database, then use your local query connection. If not, then post the search to the music database.

The problem you are going to run into is that when you post the variables to music database, the results will load the music stores result page, so the transaction will be quite noticable.
__________________

Please login or register to view this content. Registration is FREE
- step-by-step learn how to design, create and install your own website in hours...not days.
Please login or register to view this content. Registration is FREE
was never so easy.
memberpro is offline
Reply With Quote
View Public Profile
 
Old 03-14-2007, 06:03 PM Re: Searching Two Databases
Extreme Talker

Posts: 172
Name: Jason
Location: Tennessee
Trades: 1
I would like to have a drop down selection where you can select Web(my database) or Music (theirs) with the default being mine. As far as the jump from my site to theirs that was already understood on my part.
__________________

Please login or register to view this content. Registration is FREE
|
LordStryfe is offline
Reply With Quote
View Public Profile Visit LordStryfe's homepage!
 
Old 03-14-2007, 10:02 PM Re: Searching Two Databases
Extreme Talker

Posts: 172
Name: Jason
Location: Tennessee
Trades: 1
Anyone know how to code this so that it works the way I want it to?
__________________

Please login or register to view this content. Registration is FREE
|
LordStryfe is offline
Reply With Quote
View Public Profile Visit LordStryfe's homepage!
 
Old 03-15-2007, 07:22 AM Re: Searching Two Databases
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
As memberpro says it will have to be done server side and you will have to "scrape" the results from the other site.

as far as the HTML goes it's

HTML Code:
<select name="whichsite" >
<option value="">Select Site</option>
<option value="this">This Site</option>
<option value="other">Other Site</option>
</select>
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Searching Two Databases
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32851 seconds with 12 queries