"Leaving site" page

Discussion in 'PHP' started by heyman12, Sep 27, 2008.

  1. #1
    I am a complete beginner at php, but I would like to try and incorporate some code into my site.
    I need to let people know when they leave a particular site, so any off site link I post will have the URL "leaving.php?direct=(URLHERE)"

    I enter that, but I need to make the Leaving.php file, and I need to know how to bring the url to the page.

    Leaving.php:
    
    <body>
    <p> you are leaving the website, and about to be directed to (URLHERE), do you want to proceed?<br />
    <a href="(URLHERE)" >Procede</a> &nbsp;&nbsp;&nbsp;&nbsp; Go back
    </p>
    </body>
    
    Code (markup):
    Please Help!
    Thanks
     
    heyman12, Sep 27, 2008 IP
  2. ads2help

    ads2help Peon

    Messages:
    2,142
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    0
    #2
    $_GET['direct'] will be carrying the value
    
    <body>
    <p> you are leaving the website, and about to be directed to <?php echo $_GET['direct']; ?>, do you want to proceed?<br />
    <a href="<?php echo $_GET['direct']; ?>" >Proceed</a> &nbsp;&nbsp;&nbsp;&nbsp; Go back
    </p>
    </body>
    
    PHP:
     
    ads2help, Sep 27, 2008 IP
  3. heyman12

    heyman12 Peon

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Great, thanks!
     
    heyman12, Sep 27, 2008 IP