-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathplacementfile.php
56 lines (51 loc) · 1.57 KB
/
placementfile.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
<?php
include 'config.php';
// mysql_select_db();
session_name("staff");
session_start();
// Check if the user is logged in, otherwise redirect to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] != true){
header("location: staff_login.php");
exit;
}
$regdno=$_POST['id1'];
//$regdno = $_GET['num'];
$sql = "select * from package where id ='$regdno'";
$result = ($conn->query($sql));
//declare array to store the data of database
$row = [];
if ($result->num_rows > 0) {
// fetch all data from db into array
$row = $result->fetch_all(MYSQLI_ASSOC);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>student profile</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css">
</head>
<body>
<div id='student'>
<p style="text-align:right;">
<a href="staff_logout.php" class="button" align='right'><img src="signout.jpg" alt="signout" width="20" height="20"></a>
</p>
<h1 align="center">STUDENTS DETAILS</h1><br>
<table border='0' cellspacing="0" align="center" style="background: color #757575;font-size: 15px;">
<?php
if(!empty($row))
foreach($row as $rows)
{
echo $rows['file'];
?>
<tr>
<?php
echo "<td rowspan='6'>" . "<a href=".$rows['file'].' width=100px height="100px">getfile</a>' . "</td>";?></tr>
<?php } ?>
</table><br><br>
</div>
</body>
</html>
<?php
mysqli_close($conn);
?>