-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchfriends.php
More file actions
52 lines (39 loc) · 1.1 KB
/
Copy pathsearchfriends.php
File metadata and controls
52 lines (39 loc) · 1.1 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
<?php
include("mysqlicon.php");
include("mylinks.php");
if (isset($_GET['q'])) {
$q=$_GET['q'];
$f="select * from tint where username like '%$q%'";
$m=mysqli_query($con, $f);
$res=$m->num_rows;
if ($q=='') {
}
elseif ($m->num_rows==0) {
echo "<div style='color:gray;''>no match found</div>";
}
else{
if ($res==1) {
echo "<div style='color:gray;''>1 match found<div>";
while ($row=mysqli_fetch_array($m)) {
$img=$row['profilepic'];
$id=$row['id'];
$username=$row['username'];
echo "<br><tr style='padding-top:0;'>";
echo "<td><img src='$img' style='width:30px; height:30px; border-radius:50%;'>"." "."<a href='publicprofile.php?id=$id' style='color:gray;'>$username</a></td>";
echo "</tr><br>";
}
}
else{
echo $res." matches found<br>";
while ($row=mysqli_fetch_array($m)) {
$img=$row['profilepic'];
$id=$row['id'];
$username=$row['username'];
echo "<br><tr style='padding-top:0;'>";
echo "<td><img src='$img' style='width:30px; height:30px; border-radius:50%;'>"." "."<a href='publicprofile.php?id=$id' style='color:gray;'>$username</a></td>";
echo "</tr><br>";
}
}
}
}
?>