Ok, I'm fairly new to sessions and this book I have isn't helping at all.
What I want setup is this:
I have a main page that checks to see if a certain variable is registered and assigned a value in the session. If not, it should display a link which will create a popup that has a DB generated list. When you click an object on the list, the variable is stored in the session, the popup is closed, and the original page is reloaded showing the newly assigned variable.
I have all of the javascript down to do the popup, close the popup, and reload the original frame so none of that is a problem. The problem is I can't for the life of me get the sessions to work.
The very BEST I can do is get the following Warning:
Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at C:\Apache2\htdocs\test\index.php:2) in C:\Apache2\htdocs\test\index.php on line 3
Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at C:\Apache2\htdocs\test\index.php:2) in C:\Apache2\htdocs\test\index.php on line 3
I've moved the code around all over the page - I even made it the very first line of the page and I still get the same error. HELP!