-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
149 lines (128 loc) · 4.45 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
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
include("connection.php");
include("header.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Online Shopping cart</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!--banner-->
<div class="banner-top">
<div class="container">
<h3 >Contact</h3>
<h4><a href="index.php">Home</a><label>/</label>Contact</h4>
<div class="clearfix"> </div>
</div>
</div>
<!-- contact -->
<div class="contact">
<div class="container">
<div class="spec ">
<h3>Contact</h3>
<div class="ser-t">
<b></b>
<span><i></i></span>
<b class="line"></b>
</div>
</div>
<div class=" contact-w3">
<div class="col-md-5 contact-right">
<img src="images/contact.png" class="img-responsive" style="">
<iframe src="https://maps.google.com/maps?width=600&height=400&hl=en&q=Aptech SFC&t=p&z=15&ie=UTF8&iwloc=B&output=embed" style="border:0"></iframe>
</div>
<div class="col-md-7 contact-left">
<h4>Let us know how we can help</h4>
<p> We're only a quick dial away. Give us a call and we'll do our best to answer any question that you may have.<br>We're here to ensure that you have the best shopping experience possible. Please contact us if we can help you in any way - simply call or fill out the following contact form and we'll get back with you as soon as possible.</p>
<ul class="contact-list">
<li> <i class="fa fa-map-marker" aria-hidden="true"></i> APTECH SFC,Karachi.</li>
<li><i class="fa fa-envelope" aria-hidden="true"></i><a href="mailto:abdulmajid22770@gmail.com">abdulmajid22770@gmail.com</a></li>
<li> <i class="fa fa-phone" aria-hidden="true"></i>+932 2268 2821</li>
</ul>
<div id="container">
<div class="resp-tabs-container hor_1">
<div>
<form action="#" method="post" style="margin-top:50px;">
<input type="text" value="Username" name="Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Username';}" required="">
<input type="email" value="Email" name="Email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" required="">
<input type="text" value="Message..." name="msg" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}" style=" padding-bottom:120px; height:180px; width:450px;">
<input name="btn" type="submit" value="Submit" >
</form>
<!-- PHP CODE Start -->
<?php
if(isset($_POST['btn']))
{
$username = $_SESSION['user'];
$query = "select * from user_info where username = '$username' ";
$run = mysqli_query($con,$query);
$row = mysqli_fetch_array($run);
$username = $row[1];
$mail = $row[2];
$name = $_POST['Name'];
$email = $_POST['Email'];
$message = $_POST['msg'];
if($name == $username)
{
if($email == $mail)
{
$query = "insert into contact (username,email,message)
values('$name','$email','$message')";
$run = mysqli_query($con,$query);
if($run)
{
echo"
<div class='alert alert-success' role='alert'>
<b>Successfull!</b>Your Message has been sent ..
</div>
";
}
else
{
echo"
<div class='alert alert-danger' role='alert'>
<b>Error!</b>Message sent Failed! ..
</div>
";
}
}
else
{
echo"
<div class='alert alert-danger' role='alert'>
<b>Error!</b>Email is Invalid ..
</div>
";
}
}
else
{
echo"
<div class='alert alert-danger' role='alert'>
<b>Error!</b>Username is Invalid ..
</div>
";
}
}
?>
<!-- End Here -->
</div>
<div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- //contact -->
<!-- Footer Include -->
<?php
include("footer.php");
?>
<!-- End Here -->
</body>
</html>