-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.txt
73 lines (59 loc) · 1.36 KB
/
search.txt
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
<?php if($_GET["search"]!=null)
{
echo '<h1>Search Results For ';
echo '<i>'.$_GET["search"].'</i>';
}
else
{
echo "Don't Search With Blank Field !!!";
}?></h1>
<?php
if($_GET["search"]!=null)
{
if($query->rowCount()==0)
{
echo '<h3> No Friends Found</h3>';
}
else{
$i = 0;
for($i=0;$i<=$query->rowCount()-1;$i++)
{
echo '<div class="sects">';
if($i%2==0)
{
for($j=0;$j<1;$j++)
{
$fnames = $row[$i]->{"fname"};
$lnames = $row[$i]->{"lname"};
$username = $row[$i]->{"username"};
echo'<div class="sect 1">
<div class="img_prof"></div>
<span>'.$fnames.' '.$lnames.'</span>
<a href="add_friend.php?friend_username='.$username.'" class="freinds">
ADD FRIEND
</a>
</div>';
}
}
else{
for($j=0;$j<1;$j++)
{
$fnames = $row[$i]->{"fname"};
$lnames = $row[$i]->{"lname"};
$username = $row[$i]->{"username"};
echo'<div class="sect 2">
<div class="img_prof"></div>
<span>'.$fnames.' '.$lnames.'</span>
<a href="add_friend.php?friend_username='.$username.'" class="freinds">
ADD FRIEND </a>
</div>';
}
}
}
}
echo '</div>';
}
else
{
}
?>