-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathfunction.php
55 lines (40 loc) · 1.43 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
<?php
function showdetails($standard,$rollno){
include('dbcon.php');
$qry = "SELECT * FROM `student` WHERE `rollno`='$rollno' AND `standard`='$standard'";
$run = mysqli_query($con,$qry);
if(mysqli_num_rows($run)>0){
$data = mysqli_fetch_assoc($run);
?>
<table align="center" border="1" style="width:50%; margin-top:40px;">
<tr>
<th colspan="3">Student Details</th>
</tr>
<tr>
<td rowspan="5"><img src="dataimg/<?php echo $data['image']; ?>"/></td>
<th>Roll No</th>
<td align="center"><?php echo $data['rollno'] ?></td>
</tr>
<tr>
<th>Name</th>
<td align="center"><?php echo $data['name'] ?></td>
</tr>
<tr>
<th>City</th>
<td align="center"><?php echo $data['city'] ?></td>
</tr>
<tr>
<th>Parents Contact no.</th>
<td align="center"><?php echo $data['pcont'] ?> </td>
</tr>
<tr>
<th>Standard</th>
<td align="center"><?php echo $data['standard'] ?> </td>
</tr>
<?php
}
else{
echo"<script>alert('No Student Found'); </script>";
}
}
?>