-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
executable file
·54 lines (37 loc) · 1.23 KB
/
delete.php
File metadata and controls
executable file
·54 lines (37 loc) · 1.23 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/********************************************************
*
* phpAbstracts
* http://www.phpabstracts.com
*
* For copyright and license information, see readme.txt
*
*********************************************************/
//Include header template
include('header.php');
//Only ADMINs can view this page
if ($admin) {
//Database Connection Variables
include('db.php');
//Connect to database
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
//Grab id of abstract to be deleted
$abstract_id = $_POST['abstract_id'];
//Delete abstract from database
$query = "DELETE FROM abstracts WHERE abstract_id = $abstract_id";
mysql_query($query) or die(mysql_error());
$query2 = "DELETE FROM reviews WHERE abstract_id = $abstract_id";
mysql_query($query2) or die(mysql_error());
mysql_close();
//Print confirmation
echo "<br /><br /><br />" .
"<div class='statusbox'>" .
"<p>Abstract #" . $abstract_id . " has been successfully deleted.</p>" .
"<p><a href='list.php'>Return " . $home_title . "</a></p>" .
"</div>".
"<br /><br /><br />";
}//if admin
//Include footer template
include('footer.php');
?>