-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_employee.php
79 lines (74 loc) · 1.58 KB
/
add_employee.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
69
70
71
72
73
74
75
76
77
78
79
<?php
session_start();
if (!isset($_SESSION["manager"])) {
header('Location: index.php');
exit;
}
require_once('mysql_conn.php');
$sql ="SELECT * FROM department";
$result = mysql_query($sql);
?>
<html>
<head><title>For Adding Employee</title></head>
<center>
<h1>New Employee Details</h1>
<hr>
<form action="add_employee1.php" method="post">
<table>
<tr>
<th>Select Department: </th>
<td><select name="dtype">
<?php
while ($row = mysql_fetch_assoc($result)) {
echo '<option value="'.$row['dept_name'].'">'.$row['dept_name'].'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th>Name: </th>
<td><input type="text" name="name"></td>
</tr>
<tr>
<th>Gender: </th>
<td><select name="gender">
<option>Male</option>
<option>Female</option>
</select>
</td>
</tr>
<tr>
<th>Date of Birth: </th>
<td><input type="date" name="date"></td>
</tr>
<tr>
<th>Phone: </th>
<td><input type="text" name="phone"></td>
</tr>
<tr>
<th>Address: </th>
<td><textarea rows='3' cols='30' name="address"></textarea></td>
</tr>
<tr>
<th>Monthly Salary: </th>
<td><input type="text" name="sal"></td>
</tr>
<tr>
<th>Employee ID: </th>
<td><input type="text" name="eid"></td>
</tr>
<tr>
<th>Password: </th>
<td><input type="text" name="pass"></td>
</tr>
<tr>
<th> </th>
<td><input type="submit" name="submit" value="Submit"></td>
</tr>
</table>
</form>
<a href="manager.php"><h4>Back to admin page</h4></a>
<a href="logout.php"><h3>Logout</h3></a>
</center>
</html>