_POST variable help
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

_POST variable help

From: <deeper@gmail.com>
Date: Mon Oct 03 2005 - 21:20:26 CEST

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_ADDR";
$visited_page="$HTTP_REFERER";

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

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

$email_body.="Name: " . $_POST[name] . "\n";
$email_body.="Message :\n";
$email_body.=$_POST[msg] . "\n\n";
############ END ############

mail($recipient,$subject,$email_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?
Received on Tue Oct 18 02:31:02 2005