-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonline.php
32 lines (31 loc) · 979 Bytes
/
online.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
<?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "raghav";
//create connection
$conn = new mysqli($servername,$username,$password,$database);
if($conn->connect_error)
{
die("connection failed:" .$conn->connect_error);
}
$email=$_SESSION["email"];
$sql="SELECT username,id FROM loveeconnect where `log` = 1 and email !='$email' ";
$result = $conn->query($sql);
$result=mysqli_query($conn,$sql);
$friends = array();
static $userid2 = array();
if ($result)
{
while($row = $result->fetch_assoc())
{
$friends['username'] = $row['username'];
$userid2['id'] = $row['id'];
foreach (array_values($userid2) as $i => $value) {
echo "$i: $value\n";
}
echo '<span><a href="#"> ' .$friends['username'].' '. $userid2['id'].'</a></span><img src="images/dot.png">';
echo "<br><br>";
}
}
?>