-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcontact_us.php
157 lines (130 loc) · 6.13 KB
/
contact_us.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="statics/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="statics/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/favicon-16x16.png">
<link rel="manifest" href="statics/site.webmanifest">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css"
integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<title>Contact us - Sparks Bank</title>
</head>
<body style="background-image:url('statics/5570834-min.jpg'); padding-top:8%;">
<?php include 'spin.php'; ?>
<style>
.nav-link:hover {
text-decoration: underline;
}
</style>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed fixed-top"
style="font-family:candara; font-size:18px; box-shadow: 0px 0px 10px 0px black;">
<div class="container-fluid">
<a href="index.php"><img src="statics\logo.png" alt=""
style="height: 80px; margin-left:25px; margin-top:10px;"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<b>
<ul class="navbar-nav ">
<li class="nav-item nav-links" style="margin-left:15px;">
<a class="nav-link text-nowrap" aria-current="page" href="index.php">Home</a>
</li>
<li class="nav-item" style="margin-left:15px; ">
<a class="nav-link text-nowrap" href="send_money.php">Send Money</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="all_cust.php">View All Customers</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="transactions.php">Transactions</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap active" href="contact_us.php">Contact Us</a>
</li>
<li class="nav-item" style="margin-left:15px; margin-right:75px;">
<a class="nav-link text-nowrap" href="about_us.php">About Us</a>
</li>
</ul>
</b>
</div>
</nav>
<?php
$conn = mysqli_connect($servername, $username, $password, $database);
if(!$conn){
die("Connection not established: ".mysqli_connect_error());
}else{
if($_SERVER['REQUEST_METHOD']== 'POST'){
$name = $_POST['name'];
$email = $_POST['email'];
$msg = $_POST['message'];
$sql = "INSERT INTO `contactus` (`name`, `email`, `message`) VALUES ('$name', '$email', '$msg')";
$result = mysqli_query($conn, $sql);
if($result){
echo '<div class="alert alert-success d-flex align-items-center" role="alert">
<div>
<i class="fas fa-check-circle"></i>
Thank you '.$name.' for contacting us!
</div>
</div>';
}else{
echo '<div class="alert alert-danger d-flex align-items-center" role="alert">
<div>
<i class="fas fa-times-circle"></i>
Oops '.$name.'! Something went wrong!
</div>
</div>';
}
}
}
?>
<style>
.formin {
border-radius: 20px;
width: 380px;
height: 50px;
padding: 5px 5px 5px 15px;
}
.mybtn {
margin-bottom: 10px;
box-shadow: 2px 2px 10px black;
border-radius: 30px;
font-weight: bold;
color: white;
}
.mybtn:active {
background-color: black;
color: white;
}
</style>
<center>
<div class="container" style="padding:10px 80px 10px 80px; margin-top:2%;">
<div
style="width:80%; background-color:rgba(0,0,0,.5); padding:5px 5px 5px 5px; border-radius:30px; box-shadow: 2px 2px 10px gray;">
<h1 style=" color:white;">Contact Us</h1>
</div>
<div class="container"
style=" backdrop-filter: blur(5px); border-radius:5px; padding: 20px 20px 20px 20px; margin-top:50px; width:60%;">
<form action="contact_us.php" method="post">
<input type="text" class="formin form-control" name="name" id="" placeholder="Name"><br><br>
<input type="email" class="formin form-control" name="email" id="" placeholder="Email"><br><br>
<textarea name="message" class="" style="border-radius:20px; padding: 5px 5px 5px 15px;"
placeholder="Enter your message" rows="5" cols="47" id=""></textarea>
<br><br><input class="btn mybtn btn-outline-light" type="submit" value="Submit">
</form>
</div>
</div>
</center>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">
</script>
</body>
</html>