-
Notifications
You must be signed in to change notification settings - Fork 0
/
geannuleerdebestelling_plaatsen_parse.php
59 lines (27 loc) · 1.29 KB
/
geannuleerdebestelling_plaatsen_parse.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
<?php
ob_start();
session_start();
include("db_connect.php");
$aantalmedicijnen = "SELECT * FROM `order` WHERE idOrder = '".$_SESSION["orderid"]."'";
if (
!isset($_POST['leverdata']) || trim($_POST['leverdata']) == '')
{
header("refresh:2; url=geannuleerdebestelling.php");
echo"<h1>U heeft een veld niet ingevult probeer het nogmaals</h1>";
}
else{
$datetime = $_POST['leverdata'];
$date = date('Y-m-d', strtotime($datetime));
$time = date('G:i:00', strtotime($datetime));
$nextday = date('Y-m-d',strtotime($date . "+1 days"));
$querynieuwevooraad = "UPDATE `order`
SET `leverdatum` = '".$date."',
`levertijd` = '".$time."',
`geannuleerd` = 0
WHERE `idOrder` = '".$_SESSION["orderid"]."'";
$resultnieuwevooraad = mysqli_query($connection, $querynieuwevooraad);
echo "<h1>De rest van uw bestelling is succesvol veranderd</h1>";
header("refresh:2; url=huisartshome.php");
}
mysqli_close($connection);
?>