This is my script test.php:
<?
session_start() ;
if($_SERVER["REQUEST_METHOD "] == "POST") check_form();
if(session_is_r egistered("ok") ) {
echo "it is ok"; //here's the
problem
session_unregis ter("ok");
}
?>
<form action="test.ph p" method="post">
<input type="submit" value="OK">
</form>
<?
function check_form() {
$ok = TRUE;
session_registe r("ok");
header("locatio n:test.php");
}
?>
The problem is that when I send form and refresh page with header, the
sentence "it is ok" doesn't show but it should because session variable
$ok is registered. What's wrong ? When I'm not using header, it works ok.
My PHP version is 4.3.1-dev.
Regards,
ABS
<?
session_start() ;
if($_SERVER["REQUEST_METHOD "] == "POST") check_form();
if(session_is_r egistered("ok") ) {
echo "it is ok"; //here's the
problem
session_unregis ter("ok");
}
?>
<form action="test.ph p" method="post">
<input type="submit" value="OK">
</form>
<?
function check_form() {
$ok = TRUE;
session_registe r("ok");
header("locatio n:test.php");
}
?>
The problem is that when I send form and refresh page with header, the
sentence "it is ok" doesn't show but it should because session variable
$ok is registered. What's wrong ? When I'm not using header, it works ok.
My PHP version is 4.3.1-dev.
Regards,
ABS