Jump to content

What does this do please, in an email form? http_referrer = getenv


11Tami

Recommended Posts

When you follow a link, your browser usually sends the address of the place you came from.  That code grabs that address.  If it's an email form, it's probably being grabbed to verify that the email form was called from your site, rather than any other site.

It can be spoofed though, so be careful that your script is not abused by spammers.
Thank you very much, it looks like my email php is missing something then. For instance.

$formurl = "http://mywebsite.com/formpage.html" ;//The address of my page with the form and fields on it.<br />
$email = $_POST['email'] ;//The email address of the person filling out the form.<br />
if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; }
I don't understand what the above "if" command is supposed to do regarding the formurl and the email.

But even as importantly, there seems to be something missing with the http_referrer.
This is how it looks in my php email form.
$http_referrer = getenv( "HTTP_REFERER" );
But there is no "if" statement for this saying if the form isn't being sent from my site
there should be an error or an exit. Does someone have anything to go it that I can use? I already looked at the php manual with no luck. Please let me know, Tami.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.