-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuserplaylists.php
91 lines (89 loc) · 1.69 KB
/
userplaylists.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
80
81
82
83
84
85
86
87
88
89
90
91
<?php
session_start();
include('dbcon.php');
if(!isset($_SESSION['id']))
header("location: index.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>Playlist</title>
<!-- <meta http-equiv="refresh" content="5"> -->
<!-- <link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
.manage{
text-decoration: none;
display: block;
border-bottom: 2px white double;
}
ol {
background: black;
padding: 20px;
}
ol li {
background: white;
padding: 5px;
margin-left: 35px;
color: white;
}
a:link, a:visited {
background-color: black;
color: white;
padding: 10px 15px;
width: 10%;
text-decoration: none;
display: inline-block;
transition: width 0.4s;
}
a:hover{
background-color: black;
color: white;
padding: 10px 15px;
width: 100%;
text-decoration: none;
display: inline-block;
}
h2{
text-align: center;
color: white;
font-weight: bold;
}
</style> -->
</head>
<body>
<?php require('sidebar.php');
userplaylists($_SESSION['id']);?>
<main class="main">
<?php
$uid=$_SESSION['id'];
$qry="SELECT * FROM `playlists` WHERE `uid`='$uid'";
$run=mysqli_query($con,$qry);
$row=mysqli_num_rows($run);
if($row)
{
?>
<h2>Your Playlists</h2><br><br>
<a class="manage" style="width: 10%" href="manageplaylist.php">Manage Playlists</a><br>
<ol>
<?php
while($data=mysqli_fetch_assoc($run))
{
?>
<li><a class="mag" style="text-decoration: none;" href="showplaylist.php?pid=<?php echo $data['pid'];?>">
<?php
echo $data['pname'];
?></a></li><?php
}?>
</ol>
<?php
}
else
{
?>
No Playlist Found!!
<?php
}
?>
</main>
</body>
</html>