-
Notifications
You must be signed in to change notification settings - Fork 0
/
instructor.php
73 lines (58 loc) · 2.58 KB
/
instructor.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
<?php
session_start();
include_once 'php_connection.php';
include "handf/header_forms.php";
error_reporting(0);
if($_SESSION['l_id']){
include "handf/slideL.php";
}elseif ($_SESSION['i_id']) {
include "handf/slideI.php";
}elseif ($_SESSION['a_id']) {
include "handf/slideA.php";
}else {
echo "invalid login details";
}
$url="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if(strpos($url,"instructor_to_db=success") == true){
echo "<script>
window.alert('Instructor Added');
</script>";
}elseif(strpos($url,"error=emptyfields") == true){
echo "<div class='container-fluid'>
<div class='col-lg-12'><div class='alert alert-warning'>
<strong>Empty!</strong> You left some fields empty!!!.<i class='material-icons'>
sentiment_very_dissatisfied
</i>
</div></div></div>";
}
?>
<!------------------------------------------------------------------------------------------------------>
<p id="p1">Add an Instructor</p>
<div class="container" id="c1">
<div class="row" >
<div class="col-md-4" >
<p>.</p>
<form class="form-group" method="POST" action="instructor_to_db.php">
<input id="i1" type="text" name="name" placeholder="Enter name"><br>
<input id="i1" type="text" name="address" placeholder="Address"><br>
<input id="i1" type="date" name="dob" placeholder="DOB"><br>
<input id="i1" type="text" name="sub" placeholder="Experties"><br>
<input id="i1" type="text" name="Qu" placeholder="Qualification"><br>
</div>
<div class="row" >
<div class="col-md-4">
<p>.</p>
<input id="i1" type="text" name="mob" placeholder="Mobile Number"><br>
<input id="i1" type="text" name="exp" placeholder="Experience"><br>
<input id="i1" type="text" name="un" placeholder="Username"><br>
<input id="i1" type="password" name="pass" placeholder="Password"><br>
<button class="btn btn-success" name="submit" type="submit">Save</button>
</form>
</div>
</div>
</div>
</div>
<!-----FOOTER----------------------------------------------------->
<?php
include "handf/footer_forms.php";
?>