Hi,
I am having a problem with sessions and have tried everything I can think of to solve this... still no success. Can anyone help...please!!? I'm running IIS6 with PHP5 (latest version).
At the top of every page in my site (the site is actually a single page 'index.php' as content is dynamically pulled in to this page from a D😎 is session_start();. At the moment for testing I have echo $PHPSESSID; at the bottom of the page. The page structure is simply:
1: Start session.
2: Get content from DB.
3: Echo session ID.
If I load the page using www.mydomain.com/index.php then the session ID is displayed as you would expect. However if I click on a link within the page body (that links back to the same page) e.g. www.mydomain.com/index.php?page=next_page then the session is killed and I get a 'variable not defined' error. If I then reload www.mydomain.com/index.php without closing down the browser then I am given a new session ID.
I have no idea why this is happening but it means I can't use sessions!! Can anyone help?
Tom