I have a session_ID problem that does not seem to be discussed on the Web. The following script will correctly echo "Session ID found" when the following lines are run as part of a page I've called article.php. However, when I run the exact same script on the exact same browser in a different file (something like counthits.php) the script echoes "Session ID not found"! How can this be? It happens both on Firefox and on Safari. Both will recognize my session ID when this script below is used in the article.php file, but won't recognize my session ID when the same script is used as part of my counthits.php file. Many thanks in advance for any clues as to why I'm getting these Twilight Zone results! if ($_SESSION['identifier'] == "Brian") { echo "Session ID found"; } else { echo "Session ID not found"; } PHP:
Yes, I'm using session_start(), thanks. I'm going to check my code again though. I think I must have different versions of a page in two separate directories.
We could help you better if you post the two different pages for us to analyze. That is, if you feel comfortable doing so.