-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpeekStudent.php
More file actions
72 lines (62 loc) · 1.67 KB
/
peekStudent.php
File metadata and controls
72 lines (62 loc) · 1.67 KB
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
<?php
$host = "localhost";
$user="root";
$password="";
$db="Hogwarts";
$con=mysqli_connect("localhost","root","","Hogwarts");
if($con === false)
{
echo "Connection failed to establish";
}
mysqli_select_db($con,$db);
$sql="SELECT `id`, `fname`, `lname`, `phoneNo`, `gender`, `email`, `class` FROM `Student`";
$dataRow="";
$result = mysqli_query($con,$sql);
?>
<!DOCTYPE html>
<html>
<head>
<title>peek student</title>
<link rel="stylesheet" type="text/css" href="login.css">
</head>
<body>
<div class="Menu">
<ul>
<li><a class="active" href="process.php">Home</a></li>
<li><a href="insert.php">Insert</a></li>
<li><a href="update.php">Update</a></li>
<li><a href="delete.php">Delete</a></li>
<li><a href="peek.php">Peek</a></li>
</ul>
</div>
<div class="loginbox" style="width: 600px">
<img src="p2.png" class="avatar">
<p style="padding-left: 210px; font-weight: bold; font-size: 7;"><h1>Student details</h1></p>
<table align="center">
<tr>
<th>id</th>
<th>First Name</th>
<th>Last Name</th>
<th>phoneNo</th>
<th>gender</th>
<th>email</th>
<th>class</th>
</tr>
<?php while($row1 = mysqli_fetch_array($result)):; ?>
<tr>
<td><?php echo$row1[0]; ?></td>
<td><?php echo$row1[1]; ?></td>
<td><?php echo$row1[2]; ?></td>
<td><?php echo$row1[3]; ?></td>
<td><?php echo$row1[4]; ?></td>
<td><?php echo$row1[5]; ?></td>
<td><?php echo$row1[6]; ?></td>
</tr>
<?php endwhile; ?>
</table>
</div>
<a href="login.php">
<img src="p3.png" alt="Logout" style="width:50px;height:42px;border:0;position: fixed;top: 8px;right: 16px;font-size: 18px;">
</a>
</body>
</html>