-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditdata.php
80 lines (54 loc) · 1.31 KB
/
editdata.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
<?php
require('dbconfig.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Workshop || Instructor</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"-->
<?php
if(!empty($_GET['meg'])){
echo $_GET['meg'];
}
?>
<body>
<div class="container">
<h2>Edit Student Data</h2>
<table class="table">
<thead>
<tr>
<th> Name </th>
<th>Email </th>
<th> Department </th>
<th> Registration </th>
</tr>
</thead>
<tbody>
<?php
$sql="SELECT *FROM info";
$result=$conn->query($sql);
$i=1;
$count = mysqli_num_rows($result);
if($result-> num_rows >0){
while($row=$result->fetch_assoc()){
echo '<tr class="success">
<td>'.$row["name"].'</tb>
<td>' .$row["email"].'</tb>
<td>' .$row["dept"].'</tb>
<td>' .$row["reg"].'</tb>
<td>' .$row["id"].'</tb>
</tr>';
echo '<td>';
echo '<a href="editformpage.php?id='.$row['id'].'">EDIT</a>';
echo '</td>';
echo '</tr>';
$i++;
}
}else{
echo "No result found";
}
?>
</tbody>
</table>
</body>
</html>