/
enter_desig.php
51 lines (43 loc) · 1.1 KB
/
enter_desig.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
<?
# enter_desig.php displays a form that allows the entry of a designation and
# handles the submission
require("accrp.php");
session_start();
require("security/secure.php");
pt_register('POST','desig_desc');
beginDocument("Enter Designation", $sess_user);
if ($desig_desc) {
$db = getDBConnection();
$result = mysql_query("INSERT INTO DESIG (DESIG_DESC) VALUES ('$desig_desc')", $db);
checkMySQLError();
mysqlReport($result, "Designation added", "main.php", "Home");
mysql_close($db);
} else {
?>
<table cellpadding=5 cellspacing=0 border=0 width='100%'>
<tr>
<td valign=top width='15%'>
<? beginPrettyTable("1"); ?>
<tr>
<? echo "<td><a href='list_desig.php'>show List</a></td>"; ?>
</tr>
<tr>
<td><hr color='black'></td>
</tr>
<? endPrettyTable();?>
</td>
<td valign=top align=center width='65%'>
<?
openForm("enterDESIGNATION", $PHP_SELF);
beginPrettyTable("2", "enter Designation");
makeTextField("desig_desc", "", "Designation");
makeSubmitter();
endPrettyTable();
closeForm();
?>
</td>
</table>
<?
}
endDocument();
?>