forked from sushil11-art/Exam-Hall-Seating-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsushil.txt
157 lines (135 loc) · 3.95 KB
/
sushil.txt
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html>
<head>
<title>update Student Data</title>
<style type="text/css">
.hr{
margin-top: 10px;
margin-right: 20px;
height: 3px;
background: darkgreen;
}
.border{
margin-left: 100px;
width: 600px;
border: 1px solid black;
border-radius: 10px;
}
.space{
margin: 10px;
}
</style>
</head>
<body>
<?php include "adminSlide.php"; ?>
<div style="margin-left: 220px; margin-top: 60px; margin-bottom: 30px;">
<!-- -----------------------------top--------------------------------------- -->
<div class="container">
<p><b><u>Update Student Data</u></b></p>
</div>
<div class="container">
<hr class="hr">
</div>
<!-- -------------------------------------------------- -->
<?php
$host = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "dbphp";
$con = mysqli_connect($host,$dbusername,$dbpassword,$dbname);
if (mysqli_connect_error()) {
die('connect Error('.mysqli_connect_error().')'.mysqli_connect_error());
}
$ID= $_GET ['id'];
$sql="select * from stuData where roll = $ID";
$result=mysqli_query($con,$sql);
$row=mysqli_num_rows($result);
$block=0;
$room=0;
$rw=0;
$checked="checked";
if ($row>0) {
while ($row = mysqli_fetch_array($result)) {
$id=$row['id'];
$name=$row['name'];
$roll=$row['roll'];
$eroll=$row['eroll'];
$gender=$row['gender'];
$dep=$row['dep'];
$sem=$row['sem'];
}
}
// // /////////////////////////////
// echo "$id ";
// echo "$name ";
// echo "$roll ";
// echo "$eroll ";
// echo "$gender ";
// echo "$sem ";
// echo "$dep ";
// echo "<br>";
// echo ($dep=='IT')? " selected IT":"";
// echo ($dep=='CE')? " selected CE":"";
// echo ($dep=='SE')? " selected SE":"";
// echo ($dep=='it')?'selected':'' ;
// if($gender== 'f'){ echo "checked F" ;}
// echo ($gender== 'm') ? "checked M" : " " ;
////////////////////////////////////
?>
<!-- -------------------------------------------------------------------------- -->
<!-- -----------------------------form------------------------------------------ -->
<div class="border">
<form style="margin-left: 100px;" action="DataUpdateStore.php" method="POST">
<input type="number" name="id" value="<?php echo $id; ?>" hidden>
<div class="space">
<label>
Student Name : <input type="text" name="name" value="<?php echo $name;?>" required >
</label>
</div>
<div class="space">
<label>
Rollno : <input type="number" name="roll" value="<?php echo $roll;?>" required>
</label>
</div>
<div class="space">
<label>
Exam Roll : <input type="text" name="eroll" value="<?php echo $eroll;?>" required>
</label>
</div>
<div class="space">
<label>Gender</label>
<label class="space">
<input type="radio" name="gender" value="m" <?php echo ($gender== 'm') ? "checked" : "" ; ?> /> Male
</label>
<label class="space">
<input type="radio" name="gender" value="f" <?php echo ($gender== 'f') ? "checked" : "" ; ?> /> Female
</label>
</div>
<div class="space">
<label>
Semester : <input type="number" name="sem" value="<?php echo $sem;?>" required>
</label>
</div>
<div class="space">
<label>
Department :
<select name="dep" >
<option value=" IT" >IT-Information Technology</option>
<option value="CE" >CE-Computer Engineering</option>
<option value="SE" >SE-Software Engineering</option>
</select>
</label>
</div>
<div class="space" align="center">
<button type="submit" name="submit">Submit</button>
</div>
</form>
</div>
<div class="container" style="margin-top: 20px;">
<hr class="hr">
</div>
<!-- ---------------------------------php----------------------------------------- -->
<!-- ---------------------------------------------------------------------------- -->
</div>
</body>
</html>