Hello,
can someone test this code and send me results ?
<?
function check_session() {
global $_SESSION;
session_start();
if (isset($_SESSION["id"]))
return true;
else {
unset($_SESSION);
session_destroy();
return false;
}
}
$sess = check_session();
if (isset($_POST["button"]) && !$sess) {
session_start();
$_SESSION["id"] = 1;
$_SESSION["name"] = "name";
header("location: http://www.php.net/");
exit();
}
?>
?><!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>XXX</title>
</head>
<body>
<form action="<? echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="submit" name="button">
</form>
</body>
</html>
i want to know if apache fails (returns no response) or if it passed.
And then try please again but with this line in function: //global
$_SESSION; # disable global
Thank you
Lampa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]