-
Notifications
You must be signed in to change notification settings - Fork 2
/
delsong.php
37 lines (22 loc) · 851 Bytes
/
delsong.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
<?php
session_start();
require_once("vars.php");
// if(!isset($_SESSION["name"]) or $_SESSION["utype"]!="admin");
// {
// header("location:error.php");
// }
$songid=$_GET["sid"];
$conn=mysqli_connect(host,usern,pass,dbname) or die ("Error in connection" .mysqli_connect_error());
$q="delete from music where songid = $songid";
mysqli_query($conn,$q) or die("Error in query" .mysqli_error($conn));
$count=mysqli_affected_rows($conn);
mysqli_close($conn);
if($count=1)
{
header("location:delete.php");
}
else
{
print"problem while deleting song";
}
?>