-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.php
60 lines (45 loc) · 1.16 KB
/
function.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
<?php
function showdetails($std,$rollno){
include('dbcon.php');
$query = "SELECT * FROM `student` WHERE `rollno` = '$rollno' AND `standerd` = '$std'";
$result = mysqli_query($con,$query);
if (mysqli_num_rows($result) > 0) {
$data = mysqli_fetch_assoc($result);
?>
<table border="1px solid black" style="width: 50%; margin-top: 20px;" align="center">
<tr>
<th colspan="3">Student Details</th>
</tr>
<tr>
<td rowspan="5"><img src="dataimg/<?php echo $data['image']; ?>" style = "max-height: 150px; max-width: 120px; padding-left: 10px"></td>
<th>Roll No</th>
<td><?php echo $data['rollno']; ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $data['sname']; ?></td>
</tr>
<tr>
<th>Standerd</th>
<td><?php echo $data['standerd']; ?></td>
</tr>
<tr>
<th>Parents Contact No</th>
<td><?php echo $data['pcont']; ?></td>
</tr>
<tr>
<th>City</th>
<td><?php echo $data['city']; ?></td>
</tr>
</table>
<?php
}
else {
?>
<script>
alert('No student Found');
</script>
<?php
}
}
?>