June 2005
Intermediate
720 pages
20h 6m
English
In the preceding example, a new version of the view_users.php script was written. This one now includes links to the edit_user.php and delete_user.php pages, passing each a user’s ID through the URL. This next example, delete_user.php, will take the passed user ID and allow the administrator to delete that user. Although you could have this page simply execute a DELETE query on the database, for security purposes (and to prevent an inadvertent deletion), there will be multiple steps:
1. | The page must check that it received a numeric user ID.
|
2. | A message will confirm that this user should be deleted.
|
3. | The user ID will be stored in a hidden form input.
|
4. | Upon submission of this form, the user will actually be deleted. ... |
Read now
Unlock full access