Posted by FrobinRobin on 05/08/07 09:39
Have you thought that you are using header() to forward to http://example.com
but are coming from http://www.example.com?
When bizarre things like this happen, I would print out the whole
$_SESSION variables to see what is contained in it.
Just use this code at different points in your scripts:
echo "This is the 'blah' point"
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
I would also remove the header() function and use a manual link to see
if you have made a mistake with the function.
I ALWAYS use a custom session name and the output buffer .. sometimes
I need to refresh the page to see the sessions, does refreshing
produce any results? (stupid question but I have to ask!)
Here is the code I use at the start and end of ALL my sites:
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
session_name("your_custom_session_name,");
session_start();
ob_start();
?>
// html header tags
// site body
<?php
ob_end_flush();
?>
Navigation:
[Reply to this message]
|