-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqueries.php
52 lines (47 loc) · 1.72 KB
/
queries.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
<html>
<head>
<link rel="stylesheet" href="main.css">
<title>Sit & Stay - Queries</title>
</head>
<body id="ordersShow" style="margin-bottom:200px">
<header id="header12">
<div class="container">
<div id="branding">
<h1>Sit & Stay</h1>
</div>
<nav>
<ul>
<a href="index.html"><li>Home</li></a>
<a href="cart.html"><li>Cart - <span class="cartcount">0</span></li></a>
<a href="about.html"><li>Why us?</li></a>
<a href="contactus.html"><li>Contact Us</li></a>
<a href="account.php"><li class="current">Account</li></a>
</ul>
</nav>
</div>
</header>
<br>
<h1>List of all Queries recieved:</h1>
<?php
$con = mysqli_connect("localhost","Harsh1254","harsh");
mysqli_select_db($con,"jproject");
$sql = "select * from contactus;";
$result = mysqli_query($con,$sql);
$i=1;
while($row = mysqli_fetch_array($result)){
if($row['message']!='')
{echo "<p>$i. ".$row['message']."</p>";
echo " By ".$row['name']."<br><br> <a href='mailto:".$row['email']."'><button class='button_1'> Reply</button> </a><br><br>";
$i+=1;}
}
?>
<footer id="footer12">
Project
<a href="#">
<div id="backTop">
<img src="Images/back-to-top.png" alt="Top" height="18px" width="18px">
</div></a>
</footer>
<script src="cartjs.js"></script>
</body>
</html>