-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeletefile3.php
52 lines (46 loc) · 1.3 KB
/
deletefile3.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
<?php
session_start();
?>
<head>
<script type="text/javascript">
function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}
</script>
</head>
<?php
include("student.php");
extract($_POST);
$rna=$_SESSION[rnna];
$rma=$_SESSION[rnma];
if(isset($_POST['Submit']))
{
If(unlink($rma))
{
$Query="DELETE from uploads where file_name = '$rna' and file = '$rma' ";
$dbresult=mysql_query($Query);
if($dbresult)
{
echo "<script type='text/javascript'>alert(\"File Successfully Deleted $rna \")</script>";
//header("location:editadmin.php");
include("editadmin.php");
}
else
{
echo "<script type='text/javascript'>alert(\"Try Again! Your File Not Deleted\")</script>";
//header("location:updateadmin.php");
include("deletefile2.php");
}
}else
{
echo "<script type='text/javascript'>alert(\"Try Again! Your File Not Deleted\")</script>";
//header("location:updateadmin.php");
include("deletefile2.php");
}
}
?>