-
Notifications
You must be signed in to change notification settings - Fork 2
/
atten.php
35 lines (26 loc) · 846 Bytes
/
atten.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
<html>
<head>
<link rel="stylesheet" type="text/css" href="button.css">
<link rel="stylesheet" type="text/css" href="button2.css">
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<center><h1>Mark the Attendance</h1></center><br><br>
<form action="update.php" method="post">
<?php
$conn=mysqli_connect('mysql.hostinger.in','u662065187_sas','@toor5','u662065187_atten');
$subn=$_POST['subname'];
$tablename=$_POST['tname'];
$que="SELECT ".$subn." FROM sub_stud";
$result=mysqli_query($conn,$que);
while($row=$result->fetch_assoc())
{
$sub=$row[$subn];
echo "<input type=\"checkbox\" name=\"checklist[]\" value=\"".$sub."\"/> <b>".$sub."<b><br>";
}
echo "<input type=\"hidden\" name=\"tname\" value=\"".$tablename."\">";
echo "<br><input type=\"submit\" value=\"Submit\">";
?>
</form>
</body>
</html>