/
index.php
52 lines (52 loc) · 1.07 KB
/
index.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
<?php require_once("functions.php"); ?>
<?php require_once("header.php"); ?>
<h1>Add person</h1>
<form class="add" method="post">
<table>
<tr>
<td>Name *</td>
<td><input type="text" name="name"/></td>
</tr>
<tr>
<td>Surname *</td>
<td><input type="text" name="surname"/></td>
</tr>
<tr>
<td>Age *</td>
<td>
<select name="age">
<option></option>
</select>
</td>
</tr>
<tr>
<td>Category</td>
<td>
<select name="category">
<?php echo options_html(NULL, NULL); ?>
</select>
</td>
</tr>
<?php
$subjs = get_subjects();
foreach($subjs as $id => $name){
?>
<tr>
<td><?php echo $name; ?></td>
<td>
<select name="subj<?php echo $id; ?>">
<option></option>
</select>
</td>
</tr>
<?php } ?>
<tr>
<td colspan= 2><input type="submit" value="Add person" name="add-person" /></td>
</tr>
</table>
</form>
<p class='error red'>
Please complete required fields(*)!
</p>
<?php require_once("add-person.php"); ?>
<?php require_once("footer.php"); ?>