-
Notifications
You must be signed in to change notification settings - Fork 0
/
grade.php
61 lines (46 loc) · 1.38 KB
/
grade.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
<?php
include_once 'temp.php';
?>
<title>Grade</title>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h1>Grade</h1>
</div>
<!-- /.row -->
</div>
<form role="form" name="form" method="POST" action="grade2.php">
<div class="form-group">
<label for="rollnum">Student</label>
<select class="form-control" id="rollnum" name='rollnum'>
<option value="NULL">Name/Roll Number</option>
<?php
$query=mysql_query("SELECT fname,lname,rollnum FROM STUDENT order by fname,lname",$cn) or die(mysql_error());
while($fet = mysql_fetch_array($query))
{
echo "<option value = '".$fet['rollnum']."'>".$fet['fname']." ".$fet['lname']."/".$fet['rollnum']."</option>";
}
?>
</select>
</div>
<div class="form-group">
<label for="session">Session</label>
<input type="text" class="form-control" id="session" name="session" placeholder="Enter session">
</div>
<button type="submit" class="btn btn-default" onclick="return check()">Submit</button>
</form>
</div>
<!-- /.container -->
<script>
function check()
{
if($("#rollnum").val()=="NULL" || $("#session").val()=="")
{
alert("Field Empty");
return false;
}
else
return true;
}
</script>