-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
executable file
·36 lines (28 loc) · 1.01 KB
/
Copy pathdelete.php
File metadata and controls
executable file
·36 lines (28 loc) · 1.01 KB
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
<?php
require_once('config.inc.php');
include('./js/functions.php');
$artistID = $_REQUEST['artistID'];
$albumID = $_REQUEST['albumID'];
$titleID = $_REQUEST['titleID'];
$db_link = mysqli_connect (DBHOST, DBUSER, DBPASS, DBDATABASE );
if($_REQUEST['order']=="deletealbum") {
$album = getalbum($albumID);
mysqli_query($db_link,"DELETE FROM title WHERE album='$albumID'");
mysqli_query($db_link,"DELETE FROM album WHERE id='$albumID'");
mysqli_close($db_link);
echo "$album wurde gelöscht";
}
if($_REQUEST['order']=="deletartist") {
mysqli_query($db_link,"DELETE FROM title WHERE artist='$artistID'");
mysqli_query($db_link,"DELETE FROM album WHERE artist='$artistID'");
mysqli_query($db_link,"DELETE FROM artist WHERE artist='$artistID'");
mysqli_close($db_link);
echo getartist($getartistID) . " wurde gelöscht";
}
if($_REQUEST['order']=="deletetitle") {
$title = gettitle($titleID);
mysqli_query($db_link,"DELETE FROM title WHERE id='$titleID'");
mysqli_close($db_link);
echo "$title wurde gelöscht";
}
?>