[Help] Variable URL Input

Discussion in 'HTML & Website Design' started by itisme1760, Nov 3, 2008.

  1. #1
    I have a URL (example http://www.laatedaa.com/albums.php?friendID=xxxxx)

    I would like to create an HTML webpage where the person would enter a friendID (the xxxxxxx), and when the person hits a Go! (a button), the numbers will be inputted into the URL and opened in a new window. How can I go about doing this? I am a newbie in HTML and want to learn.
     
    itisme1760, Nov 3, 2008 IP
  2. iwtmmo

    iwtmmo Active Member

    Messages:
    832
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #2
    It's simple.

    HTML page form code:
    ====================================
    <form name="form1" method="post" action="go.php" target="_blank">
    Enter Friend ID: <input name="friendid" type="text">
    <input type="submit" name="Submit" value="Submit">
    </form>
    ====================================

    go.php codes:
    ====================================
    <?
    $FriendID = strip_tags($_POST['friendid']);
    header("location:http://www.laatedaa.com/albums.php?friendID=$FriendID");
    exit();
    ?>
    ====================================
     
    iwtmmo, Nov 3, 2008 IP