-
Notifications
You must be signed in to change notification settings - Fork 0
/
homeless_notification_all.php
96 lines (69 loc) · 1.93 KB
/
homeless_notification_all.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
<html>
<body bgcolor="lightblue">
<div align="left">
<?php
$servername = "localhost";
$username = "username";
$password = "";
$dbname = "helping_hands";
// Create connection
$conn = new mysqli('localhost', 'root', '', 'helping_hands');
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//$Username= $_SESSION['Username'];
$sql = "SELECT name,contact_number ,email,address,description,created,id_image,city FROM homeless_register ";
$result = $conn->query($sql);
echo "<h2><u>HOMLESS PEOPLE</u><h2>";
//while($row = $result->fetch_assoc()) {
//echo "<table border='1'>
echo "<table>
<tr>
<th>CREATED ON</th>
<th>NAME</th>
<th>EMAIL</th>
<th>MOBILE</th>
<th>ADDRESS</th>
<th>DESCRIPTION</th>
<th>CITY</th>
<th>IMAGE</th>
</tr>";
$link_address="get_image.php";
session_start();
while($row = $result->fetch_assoc())
{
$id=$row['id_image'];
$_SESSION['id'] = $id;
echo "<tr>";
echo "<td>" . $row['created'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['contact_number'] . "</td>";
echo "<td>" . $row['address'] . "</td>";
echo "<td>" . $row['description'] . "</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>";
echo "<a href=get_image.php?id=$id>click here to see image</a>";
//echo " <p id="para">image</p>";
echo "</a>";
echo "</td>";
/*echo "<form action="get_image.php" method="POST">";
echo "$_SESSION['varname'] = $row['id_image']";
echo " <input type="submit" value="Submit">";*/
//echo "<a href="get_image.php"</a>";
echo "</td>";
echo "</tr>";
//echo "$_SESSION['varname'] = $row['id_image']";
}
echo "</table>";
$conn->close();
?>
<script>
document.getElementById("para").onclick = function () {
location.href = "anysite.com";
};
</script>
</div>
</body>
</html>