ojsimon
03-04-2008, 07:12 PM
Hi
I am making a search form that returns the word that the user searched as an experiment, this is the code i am using on index.html
<html>
<body>
<center><form action="welcome.php" method="post">
<input type="text" size="40" name="name" /></center>
<center><input type="submit" value="Search" /></center>
</form>
</html>
Then for the second page welcome.php i am using
<?php echo $_POST["name"]; ?>
What i want is firstly for what the user searches to be in the url for example in a google search for php http://www.google.co.uk/search?hl=en&q=php&btnG=Google+Search&meta= php is in the url how can i make mine so it is /search?PHP for example?
Also how can i make it so on the second page the search box is there?
Thanks
I am making a search form that returns the word that the user searched as an experiment, this is the code i am using on index.html
<html>
<body>
<center><form action="welcome.php" method="post">
<input type="text" size="40" name="name" /></center>
<center><input type="submit" value="Search" /></center>
</form>
</html>
Then for the second page welcome.php i am using
<?php echo $_POST["name"]; ?>
What i want is firstly for what the user searches to be in the url for example in a google search for php http://www.google.co.uk/search?hl=en&q=php&btnG=Google+Search&meta= php is in the url how can i make mine so it is /search?PHP for example?
Also how can i make it so on the second page the search box is there?
Thanks