Jump to content

$site Problem... works in Firefox, not in IE???


Recommended Posts

Hi everyone, real quick question:

 

I have a 'send to friend' email form working just fine from Firefox, but in Internet Explorer the link is not showing up.  Here's what I've got:

 

<?PHP

$site = $_SERVER['HTTP_REFERER'];

?>

 

My form uses "link" to store the $site variable.

 

<input type="hidden" name="link" value="<?PHP echo $site; ?>">

 

It calls another .php link where it posts the message using the global function:

 

<?PHP

global $_POST;

$uname = $_POST["yourname"] ;

$uemail = $_POST["youremail"];

$fname = $_POST["friendsname"];

$femail = $_POST["friendsemail"];

$message = $_POST["message"];

$link = $_POST["link"];

$to = "$femail";

$subject = "$uname Wants You To Check Out This Website";

$headers = "From: $uemail\n";

 

$message = "Hello $fname.

$uname would like you to visit $link\n

$message";

 

if (preg_match(' /[\r\n,;\'"]/ ', $_POST['uemail'])) {

  exit('Invalid Email Address');

}

else {

mail($to,$subject,$message,$headers);

}

 

?>

 

The mail script works great, and on Firefox I can see and click the link.  In I.E. the link is blank, as I said.  Any obvious reason for this?

 

Thanks in advance for the help.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/73345-site-problem-works-in-firefox-not-in-ie/
Share on other sites

'HTTP_REFERER'

    The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.