[PHP] PHP sessions, AJAX, authentication and security.

2009-11-21 Thread Angus Mann
Hi all. A question about PHP sessions and their interaction with AJAX. I have a database containing sensitive information and users need to log in to my PHP script and be authenticated before they are granted access. For one of the forms I would like to retrieve information using AJAX, and

Re: [PHP] PHP sessions, AJAX, authentication and security.

2009-11-21 Thread Phpster
You could use a one time token on each request Bastien Sent from my iPod On Nov 21, 2009, at 6:30 AM, Angus Mann angusm...@pobox.com wrote: Hi all. A question about PHP sessions and their interaction with AJAX. I have a database containing sensitive information and users need to log in

Re: [PHP] PHP sessions, AJAX, authentication and security.

2009-11-21 Thread tedd
At 9:30 PM +1000 11/21/09, Angus Mann wrote: Hi all. A question about PHP sessions and their interaction with AJAX. I have a database containing sensitive information and users need to log in to my PHP script and be authenticated before they are granted access. For one of the forms I would

[PHP] Re: PHP sessions, AJAX, authentication and security.

2009-11-21 Thread Nathan Rixham
Angus Mann wrote: Hi all. A question about PHP sessions and their interaction with AJAX. I have a database containing sensitive information and users need to log in to my PHP script and be authenticated before they are granted access. For one of the forms I would like to retrieve

Re: [PHP] Re: PHP sessions, AJAX, authentication and security.

2009-11-21 Thread Angus Mann
same as everywhere else in your apps.. ajax is no different in any way at all, not even slightly. as far as PHP and web server is concerned it's just a plain old request same as any other; thus.. if( !$_SESSION['is_logged_in'] ) { exit(); } // do stuff Thanks for that. Sometimes the

[PHP] sessions and authentication

2001-12-21 Thread Steve Maroney
Hey guys, I know this has been brought up several times but can't find it in the archives of this list. I have some PHP 4 scripts that check the value of a logged in variable. if the user authenticates him/her self, then the logged in variable gets set and registered with the session. How