Sessions

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 the session be cleared so that the new URL will be captured?

if(!isset($_SESSION['referrer'])){
//get the referrer
if ($_SERVER['HTTP_REFERER']){
$referrer = $_SERVER['HTTP_REFERER'];
}
else{
$referrer = "http://www.site.com";
}
//save it in a session
$_SESSION['referrer'] = $referrer; 
}

You should be able to just use:

unset($_SESSION['referrer']);

That does not work. I feel like i am just missing something!