gruetztian
11-07-2003, 08:05 AM
at startup the script jumps into condition two (the else case)
starts a session sets a cookie with the session id and calls the same page again. then the page should read the session cookie (that works) and should check it with the session_id (but that didnt work). can anybody help me please!!!
<?
if(isset($HTTP_COOKIE_VARS['sess']) && $HTTP_COOKIE_VARS['sess'] && session_id())//didnt work
{
echo "logged in...";
}
else
{
session_start();
setcookie("sess",session_id());
echo "<script>location.href = \"self.php\";</script>";
}
?>
(sorry i'm a language putridly german with bad english knowledge there for dont wonder about my construction of sentence)
starts a session sets a cookie with the session id and calls the same page again. then the page should read the session cookie (that works) and should check it with the session_id (but that didnt work). can anybody help me please!!!
<?
if(isset($HTTP_COOKIE_VARS['sess']) && $HTTP_COOKIE_VARS['sess'] && session_id())//didnt work
{
echo "logged in...";
}
else
{
session_start();
setcookie("sess",session_id());
echo "<script>location.href = \"self.php\";</script>";
}
?>
(sorry i'm a language putridly german with bad english knowledge there for dont wonder about my construction of sentence)