Jump to content

confirm delete


jeff5656

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.