I wanted to see if absolute or relative URLs had anything at all to do
with the session variable information being lost. So, I wrote a simple
test program. It is at www.sheldonlg.com/headertest/index.php. The
results were not what I expected. BOTH ways lost the session information.
All this test application does is call session_name to set a name. Then
session_start. It prints out the name and dumps the session variables.
It has two buttons, one for absolute header path and one for relative
path. Each is a submit butto that goes to a page where the test is made
as the the source of the click and then uses a header("Location....)
command to go to one of two different pages. Each of those pages dumps
the session variables and the session name, and all pages (other than
the index page described earlier) has session_start(); as the first
executable line.
What happens is that the session variables are lost and the session
names become PHPSESSID, the default.
What is wrong here? It seems so exceedingly elementary. I have done
this process so many times to set and later read session variables that
is has become second nature to me. Why is it not working in this very
simple application?