-
Notifications
You must be signed in to change notification settings - Fork 0
/
orders-del.php
49 lines (39 loc) · 1.07 KB
/
orders-del.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/*
DELETE.PHP
Deletes a specific entry from the 'players' table
*/
// header
include('header.php');
// connect to the database
include('linkupdb.php');
// check if the 'id' variable is set in URL, and check that it is valid
if (isset($_GET['orderNumber']) && is_numeric($_GET['orderNumber']) && $_GET['orderNumber'] > 0)
{
// get id value
$orderNumber = $_GET['orderNumber'];
// delete the entry
$result = mysql_query("DELETE FROM orders WHERE orderNumber='$orderNumber'")
or die(mysql_error());
?>
<div id="orders" class="section">
<div class="fixed-wrapper"><h1>Orders Details</h1></div>
<div class="jumbotron">
<h1>Orders Details Deleted</h1>
<p> <?php echo '<div class="alert alert-danger">Orders deleted from the database </div>';?> </p>
</div>
</div>
<?php
}
else
{
?>
<div class="jumbotron">
<h1>No Information!</h1>
<p> <?php echo '<div class="alert alert-danger">Unable to find office details within the database </div>';?> </p>
</div>
<?php
}
// footer
include('footer.php');
?>