Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide button value in url?

Tags:

html

This is my search form:

   <form action="" method="get" name="search">
   <input name="s" type="text" size="40" value="<?php echo $_GET["s"]; ?>" />
   <input name="submit" type="submit" value="Search" />
   </form>

When someone clicks the search button the url in browser's address bar is something like this:

http://example.com/?s=someting&submit=Search

How can I change it so that it only displays:

http://example.com/?s=someting

Hope I'm clear...

like image 287
King Julien Avatar asked Jun 13 '10 17:06

King Julien


1 Answers

Remove name="submit" from the <input type="submit"> button

like image 191
Ivar Bonsaksen Avatar answered Oct 05 '22 08:10

Ivar Bonsaksen