-
Notifications
You must be signed in to change notification settings - Fork 18
/
hod_studentDetails.php
86 lines (78 loc) · 2.72 KB
/
hod_studentDetails.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
include 'config.php';
session_name("hod");
session_start();
// Check if the user is logged in, otherwise redirect to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: hod_login.php");
exit;
}
$regdno=$_SESSION['r'];
$sql = "select * from package where regdno='$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>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css">
<style>
.tab {
border: 1px solid black;
padding: 10px;
margin: 5px;
text-align: center;
}
</style>
</head>
<body style="background: color #959595;">
<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>
<table border='3' cellspacing="0" align="center" style="background: color #757575;">
<thead class="tab">
<tr>
<th>OfferId</th>
<th>Company Name</th>
<th>Package</th>
<th>Offerletter</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($row))
foreach($row as $rows)
{
?>
<tr>
<td><?php echo $rows['id'];?></td>
<td><?php echo $rows['companyname']; ?></td>
<td><?php echo $rows['package']; ?></td>
<td><?php echo $rows['file']; ?></td>
<?php
echo "<td>" . "<a href=" .'"uploaded_files/' . $rows['file'].'"'.' width=100px height="100px" style="text-decoration:none;color:black;" target="_blank"><img src="getfile.jpg" alt="getfile" width="20" height="20"></a>' . "</td>";?>
</tr>
<?php } ?>
</tbody>
</table>
<!--<form method="post" action="placementfile.php" >
<table align="center">
<tr><td><br><br><br></td></tr>
<tr><td style="text-align:right;"><label for="id1">Offer ID:</label></td>
<td><input type="number" name="id1" id="id1"></td></tr>
<tr><td style="text-align:right;"><input type="reset" id="reset" >
<img src="reset1.jpg" alt="reset" width="200" height="200"></td>
<td><input type="submit" value="GetFile" class="button"></td></tr>
</table>
</form>-->
</body>
</html>
<?php
mysqli_close($conn);
?>