davide101
06-15-2006, 01:47 PM
I currently have a single, small search box in the top right corner of my site (like everyone should). I need to make this search box work with two different search scripts: Site Search and Forum Search.
It should look like this:
[Input Box] [Site Search Button] [Forum Search Button]
I am very comfortable with PHP but have yet to use it to pass variables between pages. Here's what I *think* I need to do to make this work:
1. User enters data into the search box and clicks the appropriate button
2. The value of the button clicked is passed to a script
3. The script examines the button pressed, determines which search script to use, and passes it the search term and hidden fields. I can (?) hardcode the required fields into the search script.
Is this the way to do it or am I off base? If yes, I'll definitely have a few follow-up questions so I can code it. Thanks!
David
P.S. The site in question is http://www.diabetesdaily.com. It's a noble cause and well worth your support. :)
It should look like this:
[Input Box] [Site Search Button] [Forum Search Button]
I am very comfortable with PHP but have yet to use it to pass variables between pages. Here's what I *think* I need to do to make this work:
1. User enters data into the search box and clicks the appropriate button
2. The value of the button clicked is passed to a script
3. The script examines the button pressed, determines which search script to use, and passes it the search term and hidden fields. I can (?) hardcode the required fields into the search script.
Is this the way to do it or am I off base? If yes, I'll definitely have a few follow-up questions so I can code it. Thanks!
David
P.S. The site in question is http://www.diabetesdaily.com. It's a noble cause and well worth your support. :)