Nitestarz78 Posted January 3, 2011 Share Posted January 3, 2011 I have an "Email a Friend" form that captures the referring url and saves it in a session. The problem is that if someone decides not to send the form and navigates away from the page, and then decides to email another page, it saves the previous url. How can I have it so that it clears the previous url and uses the new one? if(!isset($_SESSION['referrer'])){ //get the referrer if ($_SERVER['HTTP_REFERER']){ $referrer = $_SERVER['HTTP_REFERER']; } else{ $referrer = "http://www.mcse-training-classes.com"; } //save it in a session $_SESSION['referrer'] = $referrer; } Link to comment https://forums.phpfreaks.com/topic/223283-sessions/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.