Ok.. im doing a kind of registration form for users... so i can deleted user from another page as an admin.. now for example i want to delete a user and i have this link:
href=deleteuser.php?userid=X
where the x depends of the user i want to delete
so in the deleteuser.php file i have a routine or function that delete the user...for example
DELETE FROM TABLE WHERE field=userid...
It works great... my problem or the thing i wanna know is HOW TO PREVENT DELETING DIRECTLY FROM ADDRESS BAR??
so i want the script only for being executed if the admin or the user that wants to delete the record comes from the page where you choose the user he wants to delete...
I dont know if you get my question.. i would like your help please!
Question
Nxt_Gate
Ok.. im doing a kind of registration form for users... so i can deleted user from another page as an admin.. now for example i want to delete a user and i have this link:
href=deleteuser.php?userid=X
where the x depends of the user i want to delete
so in the deleteuser.php file i have a routine or function that delete the user...for example
DELETE FROM TABLE WHERE field=userid...
It works great... my problem or the thing i wanna know is HOW TO PREVENT DELETING DIRECTLY FROM ADDRESS BAR??
for example if i write in the IE address bar this http://server/deleteuser.php?userid=5 it will execute directly the script...
so i want the script only for being executed if the admin or the user that wants to delete the record comes from the page where you choose the user he wants to delete...
I dont know if you get my question.. i would like your help please!
Any question yo ucan tell me!
Thanks!
Link to comment
Share on other sites
14 answers to this question
Recommended Posts