homepage Welcome to WebmasterWorld Guest from 54.204.58.87
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php sessions and disabled cookies
Why won't this work?
Nick_W




msg:1303542
 5:32 pm on Jun 7, 2002 (gmt 0)

Hi everyone.

I have php compiled with --enable-trans-sid but when I disable cookies the session is not being propagated through the url as I thought it would.

Any thoughts?

Nick

 

rewboss




msg:1303543
 6:37 pm on Jun 7, 2002 (gmt 0)

Once you've called session_start() you will have the session ID available in a constant called SID. You need to include this in any URLs where you wish to propogate the session, like this:

<a href="nextpage.php?<?=SID?>">Next page</a>

Nick_W




msg:1303544
 7:11 pm on Jun 7, 2002 (gmt 0)

Thanks for the reply but as I said I have --enable-trans-sid compiled into php so that takes care of server-side propagation automatically.

Actually, I've sorted it, I'm afraid it was a case of not seeing the wood for the trees:

The session is passed via url if cookies are disabled right? I was redirecting not linking so there was no way to pass the SID.

Doh!

Nick

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved