-
Notifications
You must be signed in to change notification settings - Fork 0
/
student2.php
67 lines (32 loc) · 1.53 KB
/
student2.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
62
63
64
65
66
67
<?php
include("header.php");
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="student.css">
</head>
<body>
<div class="div1" > B.Tech <B>STUDENTS 2</B><sup>th year</sup> </div>
<?php
include("config.php");
$sql = "SELECT * FROM student where year='2'";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) { ?>
<div style=" background-color: #C2C2C3; margin-left: 150px; height: 240px;width: 440px;float: left; margin-top: 40px;box-shadow: 3px 3px 3px 3px gray;">
<div style="height: 200px;width: 180px;float: left; margin-top: 15px"><img src="student\<?php echo $row["name"]; ?>" height="160px;" width="160px;" style="margin-top: 20px; margin-left: 10px;box-shadow: 3px 3px 3px 3px gray" >
</div>
<div style=" height: 200px; width: 255px;float: right; margin-top: 15px ;box-shadow: 3px 3px 3px 3px gray;background-color: #E5E5E5">
<b><p style="margin-left: 5px; font-size: 18px; ">NAME:- <?php echo $row["username"]; ?></p></b><b><p style="margin-left: 5px; font-size: 18px; ">Roll No<?php echo $row["rollno"]; ?></p></b><b><p style="margin-left: 5px; font-size: 18px; "><?php echo $row["email"]; ?></p></b><b><p style="margin-left: 5px; font-size: 18px; "><?php echo ucfirst($row["address"]); ?></p></b></div>
</div>
<?php
}
} else {
echo "0 results";
}
?>
</body>
</html>