_POST variable help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • deeper@gmail.com

    _POST variable help

    hey all,

    I have a PHP drive contact page which makes use of the basic mail()
    function to send a mail commenting on the page of a photoblog.

    The code looks like:

    $host= $_SERVER['REMOTE_ADDR'];
    $ip="$REMOTE_AD DR";
    $visited_page=" $HTTP_REFERER";

    $recipient="me@ them.com";
    $subject="Conta ct form from site.";

    ############ EMAIL BODY ############
    $header="From: " . $_POST[email] . "\n";

    $email_body.="N ame: " . $_POST[name] . "\n";
    $email_body.="M essage :\n";
    $email_body.=$_ POST[msg] . "\n\n";
    ############ END ############

    mail($recipient ,$subject,$emai l_body,$header, $visited_page);

    What i would like the script to do is send the page in which the user
    was viewing at the time. Initially i thought the HTTP_REFERER would do
    the trick, but so far thats not proving correct

    Am i missing something glaringly obvious?

  • deeper@gmail.com

    #2
    Re: _POST variable help

    Actually this isnt as easy as i thought, so please ignore the post..

    Thanks

    Comment

    Working...