-
Notifications
You must be signed in to change notification settings - Fork 0
/
view2.php
71 lines (44 loc) · 1.55 KB
/
view2.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php session_start();
?>
<!--PABALLO MOLATI 1818416-->
<!DOCTYPE html>
<head>
<meta charset="uft-8">
<meta name="viewpoint" content="width=device-width, initial-scale=1.0">
<title> Sk'haftine chancel order page </title>
<link rel="stylesheet" type="text/css" href="thestyle.css">
</head>
<body>
<div class="header">
<h1>SK'HAFTINI WEB APP</h1>
<ul>
<li><a class="active2" href="#">Chancel order </a></li>
<li><a href="food_site.php">rastaurants </a></li>
<li><a href="home_page.html"> Home </a></li>
<li><a href="c_log.html"><button> log out</button> </a></li>
<li><a href="view.php"><button>Back(view)</button> </a></li>
</ul>
</div>
<section>
<?php
$order_id =$_POST['id'];
$status="chancelled by client";
$fee="5";
$dbServername = "localhost";
$dbUsername = "root";
$dbPassword = "";
$dbName = "skhafthini";
$aVar = mysqli_connect($dbServername,$dbUsername,$dbPassword,$dbName);
$sql=mysqli_query($aVar,"UPDATE orders SET order_status ='".$status."', charges = '".$fee."' WHERE order_id = '".$order_id."' ");
if ($sql === TRUE) {
echo "<h1>Record updated successfully.....</h1>";
} else {
echo "<h1>Error updating record....try again </h1> " . $con->error;
}
?>
</section>
<footer>
<p>Copyright©:Sk'haftini Web App 2020 | Designed by Paballo Molati</p>
</footer>
</body>
</html>