Important note that it just took me the better part of two
hours to figure out: Even if you're using
session_write_close(), calling exit after a redirect will
eat your session variables. I had the following:
Source of register.php:
<?PHP
// Some files included here
// Process our posted form data
$result = processPost();
if ($result)
{
redirect('success.php');
}
else
{
redirect('failure.php');
}
exit;
?>
processPost() was setting a couple of session variables,
including an error message, but neither results page was
seeing those variables. I removed the exit call from the
register page, and all works fine.
/bonks self
----
Server IP: 64.71.164.2
Probable Submitter: 208.18.162.201
----
X-Spam-Status: No, hits=3.1 required=5.0
tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://w
ww.php.net/manual/en/ref.session.php
Edit -- http://master.p
hp.net/note/edit/62433
Del: integrated -- ht
tp://master.php.net/note/delete/62433/integrated
Del: useless -- http:
//master.php.net/note/delete/62433/useless
Del: bad code -- http
://master.php.net/note/delete/62433/bad+code
Del: spam -- http://m
aster.php.net/note/delete/62433/spam
Del: non-english -- h
ttp://master.php.net/note/delete/62433/non-english
Del: in docs -- http:
//master.php.net/note/delete/62433/in+docs
Del: other reasons-- http://master
.php.net/note/delete/62433
Reject -- http://master
.php.net/note/reject/62433
Search -- http://ma
ster.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|