-
Notifications
You must be signed in to change notification settings - Fork 0
/
'
69 lines (54 loc) · 1.14 KB
/
'
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
<?php
session_start();
if($_SESSION['SESS_MEMBER_ID']==NULL)
{
header('Location: login-form.php');
}
else
{
echo $_POST['id'];
$id= $_POST['id'];
}
?>
<html>
<head>
</head>
<body>
<?php
$con=mysqli_connect("localhost","root","mysql","login");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$val =$_SESSION['SESS_MEMBER_ID'];
$halo = mysqli_query($con,"SELECT * FROM halo where halo_id=$id");
$rec = mysqli_query($con,"SELECT * FROM receivers where halo_id=$id");
?>
<!-- Halo heading -->
<div>
<?php
while($row= mysqli_fetch_array($halo))
{
$message=$row['message'];
$t=$row['t1'];
echo "<h1 align='center'>$message</h1>";
echo "<p align='center' style='margin:5px;'><b>Receivers: ";
while($r=mysqli_fetch_array($rec))
{
$con=mysqli_connect("localhost","root","mysql","login");
$rid=$r['receiver'];
echo $rid;
$name = mysqli_query($con,"SELECT * FROM members where member_id=$rid");
while($rname= mysqli_fetch_array($name))
{
echo $rname['login'];
}
}
echo "</b></p>";
echo "<p align='center' style='margin:5px;'><b>$t </b></p>";
}
?>
</div>
</body>
</html>