Passing search query in url with HTML

Discussion in 'HTML & Website Design' started by Luke Jones, Jul 17, 2007.

  1. #1
    Hello,
    I know how to pass the search query in php:
    $searchquery = ($_GET['query']);
    echo "<form action=\"/news2.php\" method=\"get\"><h3><font size=\"5\" color=\"#00FFFF\">Next page of News Articles about</font><input type=\"submit\" name=\"query\" value=\"$searchquery\"></h3></p></form>";
    Could you please tell me how to do this with HTML code?

    Thanks
     
    Luke Jones, Jul 17, 2007 IP
  2. jawanda

    jawanda Peon

    Messages:
    151
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can't do it with JUST html.

    You will need to utilize either php or javascript to make it happen.

    -P
     
    jawanda, Jul 17, 2007 IP
  3. Luke Jones

    Luke Jones Peon

    Messages:
    427
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's impossible to do it with html?
    Could you tell me how to do it with javascript?
    Thanks
     
    Luke Jones, Jul 17, 2007 IP
  4. jawanda

    jawanda Peon

    Messages:
    151
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    jawanda, Jul 17, 2007 IP
  5. Luke Jones

    Luke Jones Peon

    Messages:
    427
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes.
    Thanks, I'll go and have a look.
     
    Luke Jones, Jul 17, 2007 IP
  6. mikeloring

    mikeloring Guest

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if what your searching for is in a database, i'd just use php/mysql.

    a simple mysql_query will do just fine.

    www designplace org/scripts php?page=1&c_id=25

    is a great tutorial for you =)

    (wont let me link it yet)
     
    mikeloring, Jul 17, 2007 IP