searching

Discussion in 'Programming' started by ehostingcomplete, Mar 31, 2005.

to remove all ads.
  1. ehostingcomplete

    ehostingcomplete New Member

    Messages:
    42
    i have a text box on my homepage, i want the button to link to something, I have a url, for example, domain.com/search.php?sk=keyword
    I want the word keyword to be replaced with the value in the text box.
    how would i do this?
    thanks
     
  2. Chroder

    Chroder New Member

    Messages:
    194
    Just create a form with the method as GET.

    HTML:
    <form action="search.php" method="get">
    <input type="text" name="sk" />
    <input type="submit" value="Go" />
    </form>
    The method GET will post the form values to URL query strings. So the text box with the name sk and the value test will result in a URL looking like search.php?sk=test.
     

Share This Page