-
Notifications
You must be signed in to change notification settings - Fork 0
/
sameer.php
71 lines (47 loc) · 958 Bytes
/
sameer.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
<html>
<head>
<style>
table
{
border-style:solid;
border-width:10px;
border-color:pink;
}
body{
background-color: black;
background: url("5.png");
background-repeat: no-repeat;
background-size: width=1080px720p;
animation: myAnim 5s ease-out 0s infinite alternate-reverse backwards;
}
</style>
</head>
<body bgcolor="#EEFDEF">
<?php
$name=$_GET["name"];
$mysqli = new mysqli("localhost:8111","root",null,"test");
// Check connection
if ($mysqli -> connect_errno) {
echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
exit();
}
$sql = " SELECT * FROM comment ";
echo "<table border='1'>
<tr>
<th>Commentss</th>
</tr>";
$result = $mysqli -> query($sql);
$name = "";
while($row = $result -> fetch_row()){
if($row[0]!=$name){
echo "<tr>";
echo "<td>" . htmlspecialchars($row[0]) . "</td>";
echo "</tr>";
}
$name=$row[0];
}
echo "</table>";
$mysqli -> close();
?>
</body>
</html>