-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelnot.php
More file actions
32 lines (23 loc) · 747 Bytes
/
delnot.php
File metadata and controls
32 lines (23 loc) · 747 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
<?php
$mdnum=$_POST['mdnum'];
$name=$_POST['name'];
/*
$username=stripcslashes($username);
$password=stripcslashes($password);
$username=mysql_real_escape_string($username);
$password=mysql_real_escape_string($password);
*/
$db_username = 'root';
$db_password = '';
$db_name = 'items';
$db_host = 'localhost';
//connect to MySql
$mysqli = new mysqli($db_host, $db_username, $db_password,$db_name);
if ($mysqli->connect_error) {
die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
}
$sql = "delete from request where modelnumber='$mdnum' and Name='$name'";
$result = $mysqli->query($sql);
header('Location: admin.html');
$mysqli->close();
?>