-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathshow_favorites_song.php
87 lines (75 loc) · 1.6 KB
/
show_favorites_song.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
<html>
<head>
<link rel="stylesheet" type="text/css" href="gaanac.css" />
</head>
<body>
<?php
session_start();
$_SESSION['heading'] ="FAVORITES";
include("gaana.php");
?>
<div class="ov">
<table border="1">
<tr>
<th>
Play
</th>
<th>
Title
</th>
<th>
Album
</th>
<th>
Artist
</th>
<th>
Genre
</th>
<th>
Rating
</th>
<th>
Download
</th>
<th>
|_|
</th>
<?php
include("connection.php");
$u = $_SESSION['username'];
$query = "SELECT song_record.song_name, song_record.song_url, song_record.genre, song_record.artist, song_record.id_no, song_record.album FROM song_record,favorites_record WHERE song_record.id_no=favorites_record.song_id && favorites_record.username='$u'";
$result = mysql_query($query) or die(mysql_error());
echo '<form name="input" action="Delete.php" method="get">';
while($row = mysql_fetch_array($result))
{
$s_url = $row['song_url'];
$s_id = $row['id_no'];
echo '<tr><td>';
echo '<a href="show_favorites_song.php?track='.$s_url.'"><img src="images/play.png"></a>';
echo "</td><td>";
//echo '<a href='.$s_url.'>'.$row['song_name'].'</a>';
echo '<a href="show_favorites_song.php?track='.$s_url.'">'.$row['song_name'].'</a>';
echo '</td>';
echo '<td>';
echo $row['album'];
echo '</td><td>';
echo $row['artist'];
echo '</td><td>';
echo $row['genre'];
echo '</td><td>';
echo '<img src="images/rating.png">';
echo '</td>';
echo '<td>';
echo '<a href="download.php?download='.$s_url.'">Download</a>';
echo '</td><td>';
echo '<input type="checkbox" name="delete[]" value='.$s_id.' />';
echo '</td>';
echo '</td></tr>';
}
echo '<input type="submit" value="Delete" />';
echo '</form>';
?>
</div>
</body>
</html>