-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.php
135 lines (124 loc) · 4.13 KB
/
add.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
session_start();
if(!isset($_SESSION['facultyloggedIN'])){
header('Location: index.php');
exit();
}
session_start();
include_once 'initials.php';
$connection= new mysqli($dbhost,$dbuser,$dbpass,$dbname);
?>
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<nav>
<div class="nav-wrapper pink">
<ul id="nav-mobile" class="left hide-on-med-and-down">
<li><a href="logout.php">Logout</a></li>
<li><a href="faculty_main.php">Faculty Home</a></li>
</ul>
</div>
</nav>
<body>
<div class="row">
<div class="col s12 m6 l8 center ">
<div class="card white z-depth-3 cont center">
<div class="card-content black-text">
<span class="card-title center">Add student</span>
<div class="row">
<form id="form" action="addstudent.php" method="post" class="col s12">
<div class="row">
<div class="input-field col s12">
<input id="grno" name="grno" type="text" class="validate" required>
<label for="grno">Gr. No</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="rollno" name="rollno" type="text" class="validate" required>
<label for="rollno">Roll No</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="firstname" name="firstname" type="text" class="validate" required>
<label for="firstname">First Name</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="middlename" name="middlename" type="text" class="validate" required>
<label for="middlename">Middle Name</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="lastname" name="lastname" type="text" class="validate" required>
<label for="lastname">Last Name</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="username" name="username" type="text" class="validate" required>
<label for="username">User Name</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="password" name="password" type="text" class="validate" required>
<label for="password">Password</label>
</div>
</div>
<div class="input-field col s12">
<select name="department">
<option value="" disabled selected></option>
<option value="INFORMATION TECHNOLOGY">INFORMATION TECHNOLOGY</option>
<option value="CIVIL">CIVIL</option>
<option value="COMPUTER SCIENCE">COMPUTER SCIENCE</option>
<option value="MECHANICAL">MECHANICAL</option>
<option value="ELECTRONICS AND TELECOMMUNICATION">EXTC</option>
<option value="AUTOMOBILE">AUTOMOBILE</option>
</select>
<label>Select your Department</label>
</div>
<div class="row">
<div class="input-field col s12">
<input id="division" name="division" type="text" class="validate">
<label for="division">Division</label>
</div>
</div>
<div class="card-action">
<input class="btn" onclick="submitForm()" type="submit" name="submit" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/materialize.min.js">
</script>
<script>
function submitForm(){
document.getElementById('form').submit();
}
$(document).ready(function(){
$('select').formSelect();
});
</script>
<style>
.cont{
margin-left:40%;
margin-top: 3%;
}
</style>
</body>
</html>