Page 1 of 1

PHP Sessions & Ajax

Posted: Sun Jul 01, 2007 8:38 pm
by Mr Tech
I'm using php and ajax to submit some stuff on a script of mine. However, in order to submit something, you need to be logged in. The script uses $_SESSION to track the login data.

When I submit something using ajax, the PHP file which the ajax file submits to does not seem to be able to read any $_SESSION data. As a result, you can't track login details....

Is there a way around it? Or am I doing something wrong?

Posted: Sun Jul 01, 2007 8:41 pm
by Benjamin
Put the session ID in the request URL.

Posted: Sun Jul 01, 2007 8:55 pm
by Mr Tech
Sweet! Thanks mate!