Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple go-to link

    The principle of this is as follows:
    - user imputs his url into a textfield (or textarea) and presses button
    - my url is added in front of his :http://myurl.com?http://hisurl.com
    - he goes to his imput page (without opening in another page)

    Could somebody guide me into doing this?
    Last edited by restinpieces; 06-23-2006 at 08:25 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    <?php
    if(isset($_POST['submit']) && $_POST['submit'] == 'Go')
    {
    $yoursite 'http://www.yoursite.com/?';
    $url $_POST['url'];
    header('Location: '.$yoursite.$url.'');
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <form action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
    <input type="text" name="url" id="url" /><input type="submit" name="submit" value="Go" />
    </form>
    </body>
    </html>
    Last edited by _Aerospace_Eng_; 06-23-2006 at 08:56 AM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks so much, you're the man

  • #4
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nvm.. figured it out
    Last edited by restinpieces; 06-23-2006 at 10:01 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •