-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditcourse.php
executable file
·22 lines (22 loc) · 1014 Bytes
/
editcourse.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
$add = 0;
if(!isset($_GET['short'])) {
$short = "";
$name = "";
$tenure = "";
$add = 1;
}
else {
$short = $_GET['short'];
$name = $_GET['name'];
$tenure = $_GET['tenure'];
}
echo "<form action='updtcourse.php?redirectto=dashboard.php' method='post' name='formC'><table>";
echo "<tr><td>Course Short:</td><td><input type='text' maxlength='2' name='short' value='" . $short . "' /><input type='hidden' maxlength='2' name='oldshort' value='" . $short . "' /></td><td>Maximum of two charecters. Set the value to NULL[empty] to remove the course from the list.</td></tr>";
echo "<tr><td>Course Name:</td><td><input type='text' name='name' value='" . $name . "' /></td><td></td></tr>";
echo "<tr><td>Course Period:</td><td><input type='text' name='tenure' value='" . $tenure . "' /></td><td></td></tr>";
echo "<tr><td></td><td><input type='submit' name='period' value='";
echo ($add == 1)?"Add":"Edit";
echo "' onClick=\"return validateC();\" /></td><td></td></tr>";
echo "</table></form>";
?>