-
Notifications
You must be signed in to change notification settings - Fork 0
/
addTemplate.php
68 lines (68 loc) · 1.76 KB
/
addTemplate.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
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src = "main.js"></script>
<title>Add Template</title>
</head>
<body>
<div class = "mainDiv" align = "center">
<?php
include_once("header.php");
?>
<form action = "addTemplate2.php" method = "POST" onSubmit = "return val_addTemplate();">
<table cellspacing = "1px" cellpadding = "5px" border = "1px" width = "100%" class = "mainTable" align = "center">
<tr>
<td width = "50%">
Template Name:
</td>
<td>
<input type = "text" value = "" name = "template_name" id = "template_name">
</td>
</tr>
<tr>
<td width = "50%">
Subject Name:
</td>
<td>
<select name = "subject_id" id = "subject_id">
<option value = "-1">Select Subject</option>
<?php
$q3 = mysql_query("select * from subjects order by subject_name asc;");
if(mysql_num_rows($q3)>0)
{
while($r3 = mysql_fetch_array($q3))
{
$subject_id = $r3["subject_id"];
$subject_name = $r3["subject_name"];
?>
<option value = "<?php echo($subject_id);?>"><?php echo($subject_name);?></option>
<?php
}
}
?>
</select>
</td>
</tr>
<tr>
<td width = "50%">
Total Marks:
</td>
<td>
<input type = "text" value = "" name = "total_marks" id = "total_marks">
</td>
</tr>
<tr>
<td colspan = "2" align = "center">
<input type = "submit" value = "Add">
</td>
</tr>
</table>
</form>
<div>
<?php
include_once("listTemplate.php");
?>
</div>
</div>
</body>
</html>