I was wondering if anybody would be able to help me insert a confirm delete popup window that closes after submit.
here is what i have so far
index.php
}
//delete tool button actions
if (isset($_GET['deletetool']))
{
$id = mysqli_real_escape_string($link, $_POST['id']);
$sql = "DELETE FROM tools WHERE id='$id'";
if (!mysqli_query($link, $sql))
{
$error = 'Error deleting tool: ' . mysqli_error($link);
include 'error.php';
exit();
}
header('Location: .');
exit();
}
maintool.php
<!--Delete Tool-->
<div valign="bottom"><form action="?deletetool" method="post">
<input type="hidden" name="id" value="<?php
echo $tools['id']; ?>"/>
<br><div><input type="submit" value="Delete"></div>
</form></div></td>
</table>
Any help would be greatly appreciated