HTML Form Problems

Discussion in 'HTML & Website Design' started by olli460, Jan 14, 2009.

  1. #1
    Hello, Ive got a search box on my website which was working for a while but something happened since i changed hosts and now its not working

    Here is the code
    
    <form type="POST" action="index.php?page=search_results">
    <input id="input" type="text" name="search" size="20">
    <input id="submit" type="submit" value="Video Search" name="sub">
    </form>
    
    HTML:
    It should goto my search_results.php page and display the results but instead it keeps going to:

    index.php?search=my+search&sub=Video+Search

    Any ideas why its doing this?
     
    olli460, Jan 14, 2009 IP
  2. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well...

    you should change the type="POST" to method="POST" as that is the correct way.
    Now (since you declare it the wrong way) the page get submitted with the "GET" method and the index.php page, most likely, cannot use the submitted information..

    Try and let us know if it works...
     
    gnp, Jan 14, 2009 IP
  3. olli460

    olli460 Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks a bunch!
    its working fine now.
     
    olli460, Jan 14, 2009 IP