-
Notifications
You must be signed in to change notification settings - Fork 1
/
maintenance.php
54 lines (34 loc) · 1.16 KB
/
maintenance.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
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<?php
$servername = "localhost";
$username = "puppies_admin";
$password = "diary123";
$dbname = "appointment";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO submission(Street, City, State, Vendor, Zipcode, date_pick, time_pick)
VALUES ('$_POST[street]', '$_POST[city]', '$_POST[state]', '$_POST[vendor]', '$_POST[zipcode]', '$_POST[date]', '$_POST[time]') ";
if ($conn->query($sql) === TRUE) {
echo "<script type='text/javascript'> alert('Submitted Successfully');</script>";
$conn->close();
sleep(4);
header('Location: maintenance.html', true, 303);
exit;
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
?>
</body>
</html>