View Full Version : Initiating session w/o refreshing a page

02-26-2007, 05:49 AM
Hi all!!

Actually i m doing an application which is same like a rediff mail message board. I have nearly completed it but not understanding tht how to initiate a session when user logs in without refreshing a page. I have already used ajax to verify user but not getting how to initiate a session or any other thing which is not on the same page for these connections.. I hope u r getting my question and i really appreciate ur response. Also if any1 have any idea of rediff msgboard plz say me what they r exactly doin, with js and ajax only or some other stuff...

Waiting 4 ur replies guys!! I will really appreciate ur responses...


03-01-2007, 03:30 PM
PHP sessions are identified by a key right. Often stored by a cookie or in the url. If you don't store the key, then how do you expect PHP session handlers to line up the request with the stored session flat file?

If you login via AJAX (you better have SSL) you can start the session on the response page dump and return the key as text or maybe do something fancy with cookies. This way, the next request will call with the key.

To be honest, I haven't tried this, but it sounds like it should work if PHP sessions appear to work as they do.