vozzek Posted October 15, 2007 Share Posted October 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/73345-site-problem-works-in-firefox-not-in-ie/ Share on other sites More sharing options...
wildteen88 Posted October 15, 2007 Share Posted October 15, 2007 Not all browsers send the referral url. Perhaps IE uses a different variable for sending the referral url. Quote Link to comment https://forums.phpfreaks.com/topic/73345-site-problem-works-in-firefox-not-in-ie/#findComment-370059 Share on other sites More sharing options...
MadTechie Posted October 15, 2007 Share Posted October 15, 2007 '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. Quote Link to comment https://forums.phpfreaks.com/topic/73345-site-problem-works-in-firefox-not-in-ie/#findComment-370073 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.