-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew_subject.php
45 lines (41 loc) · 1.46 KB
/
new_subject.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
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header.php"); ?>
<?php
find_selected_page();
?>
<table id="structure">
<tr>
<td id="navigation">
<?php echo navigation($subject, $page); ?>
</td>
<td id="page">
<h2>Add Subject</h2>
<form action="create_subject.php" method="post">
<p>Subject name:
<input type="text" name="menu_name" value="" id="menu_name" />
</p>
<p>Position:
<select name="position">
<?php
$subject_set = get_all_subjects();
$subject_count = mysqli_num_rows($subject_set);
for ($count = 1; $count <= $subject_count + 1; $count++) {
echo "<option value=\"{$count}\">{$count}</option>";
}
?>
</select>
</p>
<p>Visible:
<input type="radio" name="visible" value="0" /> No
<input type="radio" name="visible" value="1" /> Yes
</p>
<input type="submit" value="Add Subject" />
</form>
<br />
<a href="content.php">Cancel</a>
</td>
</tr>
</table>
<?php require("includes/footer.php"); ?>