-
Notifications
You must be signed in to change notification settings - Fork 0
/
attendants4.php
83 lines (62 loc) · 1.45 KB
/
attendants4.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
<html>
<head>
<title>CIS</title>
<style>
table,th,td {
border:1px solid black;
background-color: #FF9900;
}
</style>
</head>
<body>
<!--insert data-->
<?php
$host="localhost";
$uname="root";
$pwd="";
$dbname="attendance";
$conn=mysqli_connect($host,$uname,$pwd,$dbname);
if($conn){
echo "successfully connected";
echo "<br>";
echo "<br>";
}
else
{
echo "Error";
}
if(!empty($_POST['submit'])){
$s="INSERT INTO cis_att_4(reg_no,IS11201,IS11302,IS11203,IS11204,IS11205,IS11206,CPE1101)
VALUES('$_POST[reg_no]','$_POST[IS11201]','$_POST[IS11302]','$_POST[IS11203]','$_POST[IS11204]','$_POST[IS11205]','$_POST[IS11206]','$_POST[CPE1101]')";
mysqli_query($conn,$s);
}
/*
$sel="select * from cis_att_4";
$search=$conn->query($sel);
if($search->num_rows>0){
echo "<table><tr>
<th>IS11201</th>
<th>IS11302</th>
<th>IS11203</th>
<th>IS11204</th>
<th>IS11205</th>
<th>IS11206</th>
<th>CEP1101</th>
</tr>";
while($row=$search->fetch_assoc()){
echo "<tr><td>".$row["reg_no"]."</td>
<td>".$row["IS11201"]."</td>
<td>".$row["IS11302"]."</td>
<td>".$row["IS11203"]."</td>
<td>".$row["IS11204"]."</td>
<td>".$row["IS11205"]."</td>
<td>".$row["IS11206"]."</td>
<td>".$row["CEP1101"]."</td></tr>";
}
echo "</table>";
}
*/
header('Location:4_cis_m2.php');
?>
</body>
</html>