AJAX coding and Sesisons
| From: | Bret Walker | Date: | Mon, 22 Aug 2005 19:57:25 +0000 |
| Subject: | AJAX coding and Sesisons | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221115@lists.php.net to get a copy of this message | ||
I'm authoring a web app, and I want to use some AJAX functionality.
The users log in via PHP, and they are verified page to page by a
session variable (which stores their username).
I want to write some PHP that alters a database, but I want to be sure
that only authorized users can access the page, and that they can only
delete items associated with their username (in the table).
I want to have javascript asynchronously call the php page, but I don't
know how to protect this page. I don't think I can rely on my session
variable, because the user won't be directly calling the page.
I don't want user A to be able to submit a request to delete an item
belonging to user B. How can I secure this setup while still using AJAX?
Thanks,
Bret
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s