Does this code go above the delete statement ?or is it added to the delete statement.
is deleteuser part of the script or do I replace it with my db name. I'm alittle slow with php and mysql. TIA for your patience. thanx **DAN** "SHEETS,JASON (Non-HP-Boise,e To: 'Daniel Negron/KBE' <[EMAIL PROTECTED]> x1)" cc: <jason_sheets@n Subject: RE: [PHP] Delete Confirmation on.hp.com> 03/19/2002 05:20 PM I have done this, the way I have done it is to have two variables you look for for example <?php if ($_REQUEST['deleteuser'] && empty($_REQUEST ['confirmdelteuser']) { deluserconfirmbox(); } elseif ($_REQUEST['deleteuser'] && $_REQUEST ['confirmdeleteuser'] == 't') deleteuser($_REQUEST['deleteuser']; } ?> the deluserconfirmbox would display html something to the effect of <HTML> <BODY> <FORM action="<?php echo $PHP_SELF; ?>"> Confirm Delete User <input type="radio" value="f"> No <input type="radio" value="t"> Yes <input type="submit" name="submit"> </FORM> Basically what this does is trap the delete command and throw a form in the middle, if they select yes it sets another value and then the script deletes the user. Jason -----Original Message----- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 2:49 PM To: SHEETS,JASON (Non-HP-Boise,ex1) Subject: RE: [PHP] Delete Confirmation Actually I can delete items fine, but I am trying to get an input box to pop up and ask "confirm record deletion by typing 'yes' " then going to the inital delete page and confirming deletion. The way I have it now, you click on delete and its gone no warning no nothin. Thanx for your response. |--------+-------------------------> | | "SHEETS,JASON | | | (Non-HP-Boise,e| | | x1)" | | | <jason_sheets@n| | | on.hp.com> | | | | | | 03/19/02 04:03 | | | PM | | | | |--------+-------------------------> > --------------------------------------------------------------------------- ------------------------------------------------------------------| | | | To: 'Daniel Negron/KBE' <[EMAIL PROTECTED]> | | cc: | | Subject: RE: [PHP] Delete Confirmation | > --------------------------------------------------------------------------- ------------------------------------------------------------------| I'm not exactly sure what you are asking for, if you are asking how to delete records from a database through PHP just pass the SQL delete command to the database just like any other query. <?php $result = mysql_query("DELETE FROM users WHERE lastname='Sheets"); if (!$result) { print 'Error, unable to delete user!'; exit; } ?> Jason -----Original Message----- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Delete Confirmation Does anyone have examples of record deletions from php to mysql? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php