-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
49 lines (28 loc) · 713 Bytes
/
Copy pathdelete.php
File metadata and controls
49 lines (28 loc) · 713 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
47
48
49
<?php
session_start();
$loguser = $_SESSION['user'];
$role = $_SESSION['role'];
include 'a1.lib';
if ($_SESSION['user']) {
$variab = $_GET['id'];
$change = $_GET['change'];
$link = new DBLink();
if($link) {
if ($change=='n') {
$sql_query = 'update inventory set deleted=\'y\' where id='.$variab;
$link->query($sql_query);
}
else {
$sql_query = 'update inventory set deleted=\'n\' where id='.$variab;
$link->query($sql_query);
}
}
unset($link);
header("Location: view.php");
}
else {
header("Refresh:3;url=login.php");
echo "You are redirecting to a login page. Wait 5 seconds";
}
// get the final result in database.
?>