-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.php
136 lines (112 loc) · 5.28 KB
/
contact.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
include 'config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact Form</title>
<link rel="stylesheet" href="css/contact.css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script src="https://kit.fontawesome.com/64d58efce2.js" crossorigin="anonymous"></script>
</head>
<body>
<?php require_once 'nav_bar.php'; ?>
<!-- contact form START -->
<div class="container-contact" style="margin-top: 25px;">
<span class="big-circle"></span>
<div class="form-contact">
<div class="contact-info">
<h3 class="title">Let's get in touch</h3>
<p class="text">
We'd Love to hear from you.<br>
Whether you are curious about features, a free trial, or even press- we are ready to answer any and all questions.
</p>
<div class="info">
<div class="information">
<img src="images/icons8-address-48.png" class="icon-contact" alt="" />
<p>92 Cherry Drive Uniondale, NY 11553</p>
</div>
<div class="information">
<img src="images/icons8-mail-96.png" class="icon-contact" alt="" />
<p>[email protected]</p>
</div>
<div class="information">
<img src="images/icons8-phone-50.png" class="icon-contact" alt="" />
<p>123-456-789</p>
</div>
</div>
<div class="social-media">
<p>Connect with us :</p>
<div class="social-icons">
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#">
<i class="fab fa-twitter"></i>
</a>
<a href="#">
<i class="fab fa-instagram"></i>
</a>
<a href="#">
<i class="fab fa-linkedin-in"></i>
</a>
</div>
</div>
</div>
<div class="contact-form">
<span class="circle one"></span>
<span class="circle two"></span>
<form action="" method="POST">
<h3 class="title">Contact us</h3>
<div class="input-container">
<input type="text" name="name" class="input"/>
<!-- <input type="text" name="name" class="input" value="<?= $_SESSION['username'] ?>" /> -->
<label for="">Username</label>
<span>Username</span>
</div>
<div class="input-container">
<input type="email" name="email" class="input"/>
<!-- <input type="email" name="email" class="input" value="<?= $_SESSION['user_email_address'] ?>" /> -->
<label for="">Email</label>
<span>Email</span>
</div>
<div class="input-container">
<input type="tel" name="phone" class="input" />
<label for="">Phone</label>
<span>Phone</span>
</div>
<div class="input-container textarea">
<textarea name="message" class="input"></textarea>
<label for="">Message</label>
<span>Message</span>
</div>
<button class="btn-contact" name="submit" type="submit">Send</button>
<!-- <input type="submit" value="Send" class="btn-contact" /> -->
</form>
</div>
</div>
</div>
<?php
include 'config.php';
if (isset($_POST['submit'])) {
$name = mysqli_real_escape_string($conn, $_POST['name']);
$email = mysqli_real_escape_string($conn, $_POST['email']);
$phone = mysqli_real_escape_string($conn, $_POST['phone']);
$message = mysqli_real_escape_string($conn, $_POST['message']);
$sql = "INSERT INTO Inbox (username, email, phone, message)
VALUES('$name','$email','$phone','$message')";
mysqli_query($conn, $sql);
echo "<script>alert('Message Sent!')</script>";
};
?>
<!-- contact form END -->
<!-- footer START -->
<?php require_once 'footer.php' ?>
<!-- footer END-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="js/contact.js"></script>
</body>
</html>