-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmindelete.php
60 lines (43 loc) · 1.27 KB
/
admindelete.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
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
<head>
<title>Delete</title>
</head>
<body>
<form action="" method="post" style="text-align:center;953">
<table style="width:50%;" align="center">
<tr>
<td align="right"> username</td>
<td> <input type="text" name="email" placeholder="email" required ></td>
</tr></br>
<tr>
<td colspan="2" align="center"> <input type ="submit" name="submit" value ="delete"></td>
</tr>
</table></form>
<?php
include("dbconn.php");
$email="";
session_start(); // Starting Session
$error=''; // Variable To Store Error Message
if (isset($_POST['submit'])) {
// Define $username and $password
$email=$_POST['email'];
//$sql="SELECT * FROM registration WHERE email='".$email."'";
$sql = "DELETE FROM register WHERE email='".$email."'";
// $sql="SELECT *FROM registration";
$run=mysqli_query($conn,$sql);
//}
/* else {
//$error = "Username or Password is invalid";
?>
<script>
alert('username or password not match');
window.open('login.php','_self');
</script>
<?php
}*/
//mysqli_close($conn); // Closing Connection
}
?>
</body>
</html>