-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_static.delete.inc.php
More file actions
executable file
·33 lines (27 loc) · 955 Bytes
/
_static.delete.inc.php
File metadata and controls
executable file
·33 lines (27 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
$id = mysqli_real_escape_string($dba->link_id, $_REQUEST [ $_id ]);
if ($_SERVER [ 'REQUEST_METHOD' ] == 'POST') {
$dba -> query('DELETE FROM ' . $realm . ' WHERE ' . $_id . '=' . $id . ' LIMIT 1');
$_SESSION['flash'] = 'Entry number ' . $id . ' deleted.';
header('Location: http://' . $_SERVER [ 'HTTP_HOST' ] .
rtrim(dirname($_SERVER [ 'PHP_SELF' ]), '/\\') . '/list.php');
exit(0);
}
?>
<html>
<head>
<title>Delete</title>
<link rel="stylesheet" type="text/css" media="screen" href="../css/default.css" />
</head>
<body>
<?php
$row = $dba -> query_first('SELECT * FROM ' . $realm . ' WHERE ' . $_id . '=' . $id . ' LIMIT 1');
?>
<p>Do you really want to delete Entry Nr. <?= $id ?> (<?= $row[$_name] ?>)?</p>
<form action="delete.php" method="POST">
<input type="hidden" name="<?= $_id ?>" value="<?= $id ?>"/>
<input type="submit" value="Yes"/>
<a href="list.php">No</a>
</form>
</body>
</html>