-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeleteTeacherInsertion2.php
87 lines (74 loc) · 2.84 KB
/
DeleteTeacherInsertion2.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
$user_name = "root";
$pass_word = "";
$database = "schoolschedule";
$server = "127.0.0.1";
$db_handle = mysql_connect($server,$user_name,$pass_word);
$db_found = mysql_select_db($database,$db_handle);
$TeacherID=$_GET["tid"];
$LastName= $_GET["ln"];
$FirstName=$_GET["fn"];
$InitializeAssignmentTable = "TRUNCATE TABLE periodassignment";
$InitializeAssignmentTableResult = mysql_query($InitializeAssignmentTable);
$InitializeAssembly = "DELETE from periodassignment WHERE SubjectID='ASS'";
$InitializeAssemblyResult = mysql_query($InitializeAssembly);
$InitializeAssembly2 = "DELETE from assignment WHERE SubjectID='ASS'";
$InitializeAssemblyResult2 = mysql_query($InitializeAssembly2);
$InitializeChapel2 = "DELETE from assignment WHERE SubjectID='CPL'";
$InitializeChapelResult2 = mysql_query($InitializeChapel2);
$InitializeChapel = "DELETE from periodassignment WHERE SubjectID='CPL'";
$InitializeChapelResult = mysql_query($InitializeChapel);
$InitializeMergeInfo = "UPDATE assignment SET MergeInfo='' WHERE MergeInfo!=''";
$InitializeMergeInfoResult = mysql_query($InitializeMergeInfo);
$InitializeMus = "DELETE from assignment WHERE SubjectID='MUS'";
$InitializeMusResult = mysql_query($InitializeMus);
$DeleteTeacher= "DELETE from teacher WHERE TeacherID='$TeacherID' AND FirstName='$FirstName' AND LastName='$LastName'";
$DeleteTeacherResult=mysql_query($DeleteTeacher);
echo $DeleteTeacher;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="MyStyle.css" type="text/css" rel="stylesheet">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Data Insertion</title>
</head>
<body>
<ul>
<li2>
<img src="logo.png" height="46" width="40">
</li2>
<li><a href="home.php">Home</a></li>
<li><a class="active" href="InsertionMenu.php">Data Insertion</a></li>
<li><a href="assignement.php">Teacher Assignment</a></li>
<li><a href="ScheduleGeneration.php">Generate Schedule</a></li>
<li><a href="#contact">Contact</a></li>
<ul style="float: right; list-style-type: none;">
<li>
<a href="#about">About</a></li>
<li>
<a href="#login">Login</a></li>
</ul>
</ul>
<div style="text-align: center; font-family: Arial;">
<h1>Teacher Insertion</h1>
<table style="width: 100%; height: 514px; text-align: left; margin-left: auto; margin-right: auto;" background="tablebackground.png" border="1" cellpadding="0" cellspacing="0">
<tr><td>
<center>
<img src="check-mark.png"><font color="green"><h2>Success</h2>
<center>
Teacher successfully deleted
</font>
</center>
<br>
<table>
<tr>
<td>
<a href="TeacherInsertion.php"><button type="button" style="height:50px; width:100px">Done</button></a>
</td>
</tr>
</tr></td>
</table>
</center>
</table>
</div>
</body></html>