-
Notifications
You must be signed in to change notification settings - Fork 14
/
condisplay.php
80 lines (77 loc) · 1.62 KB
/
condisplay.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
<!DOCTYPE html>
<html>
<head>
<title>Display Gallery</title>
<style>
b{
font-size: 30px;
font-family: 'Arial';
padding: 2px;
text-align: center;
}
table
{
border-collapse: collapse;
width: 100%;
color: #588c7e;
font-family: monospace;
font-size: 25px;
text-align: left;
font-family:"Verdana";
font-weight: bold;
text-align: center;
border-radius: 14px;
}
th
{
background-color: mediumslateblue;
color: white;
border-radius: 14px;
}
h1{
font-family: "Arial";
font-size: 50px;
border: 9px solid mediumpurple;
border-radius: 17px;
color: black;
}
td{
padding: 12px;
border-radius: 14px;
}
tr:nth-child(even) {background-color: #f2f2f2;
border-radius: 14px;}
</style>
</head>
<body style="background-color: lavenderblush">
<h1><center><font style="border:9px solid mediumpurple"> DISPLAY CONTENTS /\/ CONTACTS TABLE </font></center></h1>
<table>
<tr>
<th><br>Customer ID<br><br></th>
<th><br>Phone No.<br><br></th>
<br><br>
</tr>
<?php
$con = mysqli_connect("localhost", "root", "", "art_gallery");
if ($con->connect_error) {
die("Connection failed: " . $con->connect_error);
}
$sql = "SELECT * from contacts";
mysqli_query($con,$sql);
if ($result = mysqli_query($con, $sql))
{
while($row = $result->fetch_assoc())
{
echo "<tr><td>" . $row["CUSTID"]. "</td><td>". $row["PHONE"]. "<br></br></td></tr>";
}
echo "</table>";
}
else
{
echo "0 results";
}
$con->close();
?>
</table>
</body>
</html>