forked from AmateurIndian/Vapor_Social_Gaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfriendList.php
79 lines (57 loc) · 3.16 KB
/
friendList.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>DADA NOOB</title>
</head>
<body>
<header id="headingTitle">
<h1>Vapour</h1>
</header>
<header id="headingHome">
<h3 id="headingText">My Friends</h3>
</header>
<div style="overflow-y: scroll; height:334px; border: 2px solid black; padding: 10px;">
<?php
mysql_connect("localhost", "root", "sarj-93") or die("mysql connection is failure.");
mysql_select_db("cs353") or die("Database does not exists.");
$val = $_GET['id'];
$value= mysql_query("SELECT * FROM `Friend` WHERE `userid` = '$val'");
if(mysql_num_rows($value) > 0){
while ($row = mysql_fetch_assoc($value)) {
$result = $row['friendId'];
$check2= mysql_query("SELECT * FROM `User` WHERE `id` = '$result'");
$check = mysql_fetch_assoc($check2);
$friendname = $check['username'];
echo "User Name: ",$friendname,"<br>";
echo "Name: ",$check['name'],"<br>";
echo "Email: ",$check['email'],"<br>";
echo "<form action='remove.php?edit=Y&id= $result&userid=$val' method='POST'>
<input type='submit' value='Remove' name='submit'>
</form>";
echo "<form action='message.php?edit=Y&id=$val&friendid=$result&friendname=$friendname' method='POST'>
<input type='submit' value='Send Message' name='submit'>
</form>";
echo "<form action='gift.php?edit=Y&id=$val&friendid=$result&friendname=$friendname' method='POST'>
<input type='submit' value='Send Gifts' name='submit'>
</form><br><br>";
}
}
?><br>
</div>
<form action='home.php?edit=Y&id=<?php echo $val ?>' method='POST'>
<input type='submit' value='Home' name='gift' style=" width: 90%;
height: 30px;
display:block;
margin-left: auto;
margin-right: auto;
background-color: transparent;
border: 2px solid black;
border-radius: 8px;
margin-top: 5px;
cursor: pointer;
" class="buttonHover" >
</form>
<footer> This webpage was made by the best CS 353 group. </footer>
</body>
</html>