forked from chiragmaniar/php_website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5_fdc_delete.php
More file actions
46 lines (29 loc) · 822 Bytes
/
5_fdc_delete.php
File metadata and controls
46 lines (29 loc) · 822 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
46
<?php
ob_start();
session_start();
//check if user has logged in or not
if(!isset($_SESSION['loggedInUser'])){
//send the iser to login page
header("location:index.php");
}
//connect ot database
include_once("includes/connection.php");
include_once("includes/functions.php");
//include custom functions files
//include_once("includes/functions.php");
//echo "flag : ".$_GET['flag']."<br>";
$flag = $_COOKIE["flag"];
if(isset($_POST['id'])){
$_SESSION['id'] = $_POST['id'];
}
?>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
var r = confirm("Do you want to delete ?");
if (r == true) {
var flag = 1;
} else {
var flag = 2;
}
document.cookie = "flag="+flag;
window.location.href = "http://localhost/project/audit/extc/51_fdc_delete.php?flag=" + flag;
</script>