Jump to content

Signing out


Vigilant Psyche

Recommended Posts

OK I managed to fix the signing in bit but now im stuck with signing out.

 

I link to this page which should unset the variable $_SESSION["CURRENT_USER"]

 

the link back to the original page works but when i get back there and echo the variable it is still set... here's the code:

 

<html>

<?php

 

$refresh=$_GET['ref'];

echo("<meta http-equiv=\"refresh\" content=\"0;url=http://www.mysite.com\">");

 

unset($_SESSION["CURRENT_USER"]);

 

?>

 

</html>

Link to comment
https://forums.phpfreaks.com/topic/97415-signing-out/
Share on other sites

don't use session_destroy() its the equivalent of deleting all your cookies for a single server!

Instead target the session u want

<?php
session_start();
$_SESSION['CURRENT_USER'] = "";
die(header("location: index.php"));
?>

 

 

 

So what would this equal to?

<?php $_SESSION[''] ?> 

Link to comment
https://forums.phpfreaks.com/topic/97415-signing-out/#findComment-498480
Share on other sites

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.