jeff5656 Posted December 13, 2008 Share Posted December 13, 2008 Is there any way to confirm deleting of a record inb this script: <?php include "connectdb.php"; $pt_id = $_POST['pt_id']; $csq1 = "DELETE FROM dos WHERE dos_id = '".$_POST['dos_id']. "'"; $result = mysql_query ($csq1) or die ("Invalid query: " . mysql_error ()); header("Location: editdos.php?action=edit&id=".$pt_id); ?> Where if they confirm it runs this but if they say "cancel" it just runs: header("Location: editdos.php?action=edit&id=".$pt_id); Link to comment https://forums.phpfreaks.com/topic/136850-confirm-delete/ Share on other sites More sharing options...
dropfaith Posted December 13, 2008 Share Posted December 13, 2008 javascript http://www.ahfb2000.com/webmaster_help_desk/showthread.php?t=658 Link to comment https://forums.phpfreaks.com/topic/136850-confirm-delete/#findComment-714717 Share on other sites More sharing options...
jeff5656 Posted December 13, 2008 Author Share Posted December 13, 2008 I read that thread and that is too complicated for my little mind to grasp. Isn't there an simple IF statement I could put in the above code before $csq1 = "DELETE FROM dos.... that would be run? Link to comment https://forums.phpfreaks.com/topic/136850-confirm-delete/#findComment-714726 Share on other sites More sharing options...
jeff5656 Posted December 13, 2008 Author Share Posted December 13, 2008 I read that thread and that is too complicated for me because I dont know enough about javascript to manipulate it. Isn't there a PHP way, perhaps a simple IF statement I could put in the above code before $csq1 = "DELETE FROM dos.... that would be run? Link to comment https://forums.phpfreaks.com/topic/136850-confirm-delete/#findComment-714727 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.