-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
27 lines (23 loc) · 1 KB
/
Copy pathdelete.php
File metadata and controls
27 lines (23 loc) · 1 KB
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
<?php
session_start();
if ($_SESSION['username'] == null) {
echo "<script>alert('Please Login First');</script>";
echo "<script>window.location.assign('index.php');</script>";
}
include("connect.php");
$sql_delete_user = "DELETE FROM enrollment_system WHERE student_id = '$_GET[id]'";
$sql_delete_grades = "DELETE FROM grade_subject WHERE id_grades = '$_GET[id]'";
$sql_delete_grades_id = "DELETE FROM grading_system WHERE student_id = '$_GET[id]'";
if ($conn->query($sql_delete_grades) == TRUE) {
if ($conn->query($sql_delete_grades_id) == TRUE) {
if ($conn->query($sql_delete_user) == TRUE) {
echo "<script>alert('Delete Account Success!');</script>";
echo "<script>window.location.assign('edit_accounts.php');</script>";
}
echo "<script>alert('Delete Account Failed!');</script>";
echo "<script>window.location.assign('edit_accounts.php');</script>";
}
echo "<script>alert('Delete Account Failed!');</script>";
echo "<script>window.location.assign('edit_accounts.php');</script>";
}
?>