-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-student.php
More file actions
130 lines (113 loc) · 4.59 KB
/
add-student.php
File metadata and controls
130 lines (113 loc) · 4.59 KB
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
<?php
if(isset($_POST['std_add_now']))
{
// $std_fullname,$std_username,$std_password,$std_grade,$std_roll,$std_dob,$std_address,$std_district,$std_gender,$std_father,$std_mother,$std_parent_contact
$std_fullname = $_POST['std_fullname'];
$std_username = $_POST['std_username'];
$std_password = $_POST['std_password'];
$std_grade = $_POST['std_grade'];
$std_roll = $_POST['std_roll'];
$std_dob = $_POST['std_dob'];
$std_address = $_POST['std_address'];
$std_adhar = $_POST['std_adhar'];
$std_gender = $_POST['std_gender'];
$std_father = $_POST['std_father'];
$std_mother= $_POST['std_mother'];
$std_parent_contact = $_POST['std_parent_contact'];
if($std_fullname=="" or $std_username=="" or $std_password=="" or $std_grade=="" or $std_gender=="" or $std_roll=="" or $std_dob=="" or $std_address=="" or $std_adhar=="" or $std_father=="" or $std_mother=="" or $std_parent_contact=="")
{
echo "<script>alert('please fill form and Add Student');</script>";
}
else
{
$add_student_done = $ravi->add_student($std_fullname,$std_username,$std_password,$std_grade,$std_roll,$std_dob,$std_address,$std_adhar,$std_gender,$std_father,$std_mother,$std_parent_contact);
if($add_student_done==true)
{
echo "<script>window.location = 'home.php?ravi=student-information';</script>";
}
else
{
echo "<script>alert('contact with developer');</script>";
}
}
}
?>
<div class="forms-main">
<div class="graph-form">
<div class="validation-form">
<!---->
<h2 align="center"><?php echo strtoupper($_GET['ravi']); ?></h2>
<form method="post">
<div class="col-md-12 form-group1 group-mail">
<label class="control-label">FullName</label>
<input type="text" placeholder="Full Name" required="" name="std_fullname">
</div>
<div class="vali-form">
<div class="col-md-6 form-group1 form-last">
<label class="control-label">Username</label>
<input type="text" placeholder="Username" required="" name="std_username">
</div>
<div class="col-md-6 form-group1">
<label class="control-label">Password</label>
<input type="text" placeholder="Password" required="" name="std_password">
</div>
<div class="clearfix"> </div>
<div class="col-md-6 form-group2 group-mail">
<label class="control-label">Grade</label>
<select name="std_grade">
<option>Select Class</option>
<?php
$st_add_class = $ravi->grade($grade);
while($st_add_class_fetch = $st_add_class->fetch_assoc())
{
?>
<option value="<?php echo $st_add_class_fetch['class']; ?>"><?php echo $st_add_class_fetch['class']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-md-6 form-group1">
<label class="control-label">gender</label>
<input type="text" placeholder="eg: Male or Female" required="" name="std_gender">
</div>
<div class="clearfix"> </div>
<div class="col-md-6 form-group1">
<label class="control-label">Roll</label>
<input type="text" placeholder="Roll" required="" name="std_roll">
</div>
<div class="col-md-6 form-group1 form-last">
<label class="control-label">DOB</label>
<input type="text" placeholder="eg 29 Feb 200" required="" name="std_dob">
</div>
<div class="col-md-6 form-group1">
<label class="control-label">Address</label>
<input type="text" placeholder="Address" required="" name="std_address">
</div>
<div class="col-md-6 form-group1 form-last">
<label class="control-label">adhar</label>
<input type="text" pattern="[0-9]{12}" length="12" placeholder="adhar" required="" name="std_adhar">
</div>
<div class="col-md-6 form-group1 form-last">
<label class="control-label">Father</label>
<input type="text" placeholder="Father Name" required="" name="std_father">
</div>
<div class="col-md-6 form-group1">
<label class="control-label">Mother</label>
<input type="text" placeholder="Mother Name" required="" name="std_mother">
</div>
<div class="col-md-12 form-group1 form-last">
<label class="control-label">Parent Contact</label>
<input type="text" placeholder="Contact Number" required="" name="std_parent_contact">
</div>
</div>
<div class="clearfix"> </div>
<div class="col-md-12 form-group button-2">
<input type="submit" class="btn btn-primary" value="Add Student" name="std_add_now">
<button type="reset" class="btn btn-default">Reset</button>
</div>
<div class="clearfix"> </div>
</form>
<!---->
</div>
</div>
</div>
<!--//forms-->