-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquerysent.php
executable file
·39 lines (30 loc) · 1.01 KB
/
querysent.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
<?php
if(isset($_POST))
{
$fullname=$_POST['fullname'];
$mail=$_POST['mail'];
$query=$_POST['query'];
}
$conn = mysqli_connect("localhost","root","","shop");
$sql = "INSERT INTO contact(cont_name,cont_email,query) VALUES('$fullname','$mail', '$query')";
if($conn->query($sql) === TRUE) {
echo '
<div class="alert alert-success" role="alert" style="margin: 15 300 15 300;">
<center> Your Query Was Successfully Sent!</center>
</div>';
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Book Planet | Query Confirmation</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<center><a class="btn btn-outline-info" href="bookplanet.php" role="button">Back To Home</a></center>
</body>
</html>