-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudioform.php
More file actions
executable file
·45 lines (41 loc) · 992 Bytes
/
audioform.php
File metadata and controls
executable file
·45 lines (41 loc) · 992 Bytes
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
<?php
session_start();
$connection = mysql_connect("localhost", "root", "");
mysql_select_db('multimedia',$connection);
if (!isset($_POST['submit'])) {
if (empty($_POST['atitle']) /*&& empty($_POST['path'])*/) {
$error = "Please enter a title";
echo $error;
exit;
}
else
{
$atitle = $_POST['atitle'];
$query = "SELECT * FROM audio WHERE title LIKE '%$atitle%'";
$apath = mysql_query($query);
$fullmpath = [];
$artist = [];
$titleofm = [];
while ($row = mysql_fetch_assoc($apath)){
if (mysql_num_rows($row || $apath) > 0)
{
}
else
{
echo "Not Found";
exit();
}
$fullmpath[] = $row['path'].'.mp3';
$artist[] = $row['artist'];
$titleofm[] = $row['title'];
print_r($row);
}
$_SESSION['titleofm']=$titleofm;
$_SESSION['artist']=$artist;
$_SESSION['fullmpath']=$fullmpath;
mysql_close($connection); // Closing Connection
session_write_close();
header('Location: index.php?cat=content&p=listen');
}
}
?>