I have a user account system and admin levels. What I want to do is delete images with jquery and PHP requests but I worry about the security, since people can use firebug to see what’s being send (User ID, Picture ID, etc…) and done in PHP so what would be a better way of doing this without worrying much about this? I could just use PHP but I want it to be animated and without refreshing the page.
Share
if you don’t want a user to delete an image that is not his, just check whether he owns it or not. something like :
SELECT * FROM table WHERE image_id='$image_id' AND user_id='$user_id'the $user_id should contain the user id stored in your session (the one you used for auth)