Hi,
I have search scripts which reads a forms and outputs to /test/searchoutput.php
The form perfectly however I am now trying a form search to a link. For example there is a link on the page called "Green Widgets". One someone clicks the link it performs a search and also outputs to /test/searchoutput.php
The idea is these links will be used directly below the search form to give examples of what users can search for.
Is it possible to do this?
Using A Link To Perform Search
Started by justlukeyou, Feb 12 2013 04:52 PM
6 replies to this topic
#1
Posted 12 February 2013 - 04:52 PM
#2
Posted 12 February 2013 - 04:56 PM
Is it possible to do this?
Yes.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#3
Posted 12 February 2013 - 05:03 PM
Thanks, how would I do this please?
Edited by justlukeyou, 12 February 2013 - 05:10 PM.
#4
Posted 13 February 2013 - 03:58 AM
Hi,
Do I need a form to the link. I cant add a query to the end of the link such as /test/searchoutput.php?search=green-widgets.
So Im a bit confused what the next step is. I have tried Googling but nothing suitable seems to come up.
I have tried "search database with link" etc
Do I need a form to the link. I cant add a query to the end of the link such as /test/searchoutput.php?search=green-widgets.
So Im a bit confused what the next step is. I have tried Googling but nothing suitable seems to come up.
I have tried "search database with link" etc
#5
Posted 13 February 2013 - 07:49 AM
Yes, you can add it to the URL.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#6
Posted 13 February 2013 - 08:19 AM
Thanks,
What process would I follow. I cant see how I can use /test/searchoutput.php?search=green-widgets
What process would I follow. I cant see how I can use /test/searchoutput.php?search=green-widgets
#7
Posted 13 February 2013 - 08:34 AM
Do you know how to use
$_GET[]? Do you know how to create a hyperlink?

My rarely updated, incredibly rambing, questionably informative blog || Don't go to w3schools || Using 'global' is a sign of doing it wrong
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












