Exoon Posted September 6, 2010 Share Posted September 6, 2010 Hello, Im trying to have my search on my site so the URL goes to index.php?page=search&string=WhatEverWasTyped How is this possible? Quote Link to comment Share on other sites More sharing options...
DarkMantis Posted September 6, 2010 Share Posted September 6, 2010 Make the search Parameter a GET instead of POST like so: $search = stripslashes($_GET['search']); //Sanitize! and use a SELECT sql statement in to check your DB. Then voila. xx Quote Link to comment Share on other sites More sharing options...
Exoon Posted September 6, 2010 Author Share Posted September 6, 2010 So i put that <form name="search" method="post" action="/search/<? $_GET['search']; ?>"> Like this ? Quote Link to comment Share on other sites More sharing options...
nethnet Posted September 6, 2010 Share Posted September 6, 2010 Just make the method of your form GET instead of POST. Quote Link to comment Share on other sites More sharing options...
Hypnos Posted September 7, 2010 Share Posted September 7, 2010 Hello, Im trying to have my search on my site so the URL goes to index.php?page=search&string=WhatEverWasTyped How is this possible? <form action="index.php" method="get"> <input type="text" name="string"/> <input type="hidden" name="page" value="search"/> <input type="submit" value="Search"/> </form> Quote Link to comment 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.