justlukeyou Posted February 12, 2013 Share Posted February 12, 2013 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? Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/ Share on other sites More sharing options...
Jessica Posted February 12, 2013 Share Posted February 12, 2013 Is it possible to do this? Yes. Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412080 Share on other sites More sharing options...
justlukeyou Posted February 12, 2013 Author Share Posted February 12, 2013 (edited) Thanks, how would I do this please? Edited February 12, 2013 by justlukeyou Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412084 Share on other sites More sharing options...
justlukeyou Posted February 13, 2013 Author Share Posted February 13, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412180 Share on other sites More sharing options...
Jessica Posted February 13, 2013 Share Posted February 13, 2013 Yes, you can add it to the URL. Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412208 Share on other sites More sharing options...
justlukeyou Posted February 13, 2013 Author Share Posted February 13, 2013 Thanks, What process would I follow. I cant see how I can use /test/searchoutput.php?search=green-widgets Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412211 Share on other sites More sharing options...
KevinM1 Posted February 13, 2013 Share Posted February 13, 2013 Do you know how to use $_GET[]? Do you know how to create a hyperlink? Quote Link to comment https://forums.phpfreaks.com/topic/274416-using-a-link-to-perform-search/#findComment-1412213 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.