-
Notifications
You must be signed in to change notification settings - Fork 0
/
a_references.php
115 lines (75 loc) · 2.13 KB
/
a_references.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<html >
<head>
<title>References</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<CENTER>
<h1><B>ADMIN PANEL</B></h1></CENTER><nav class="navbar">
<!-- NAVIGATION MENU -->
<ul class="nav-links">
<!-- USING CHECKBOX HACK -->
<!-- NAVIGATION MENUS -->
<div class="menu">
<li><a href="a_references.php">References</a></li>
<li>
<a href="a_details.php">Student's Details</a></li><li>
<a href="a_mainadmin.php">Update Chapters</a></li>
<!-- <a href="add_edit_questions.php.php">Add Questions</a> -->
</li>
<li><a href="a_add_edit_questions.php">Add Questions</a></li>
</div>
</ul>
</nav>
<br><br>
<button class="btn" name="add" onclick="fun()">+ Add</button>
<script>
function fun(){
location.replace("a_referenceform.php");
}
</script>
<table class="container">
<table class="table" >
<thead class="tablehead" >
<tr >
<th>ID</th>
<th>SUBJECT</th>
<th>URL</th>
<th>Delete</th>
</tr>
</thead>
<?php
require_once "config.php";
error_reporting(0);
$sql = "SELECT * FROM reference ";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
// $id = $id + 1;
echo"<tr>
<td>" . $row['id'] . "</td>
<td>" . $row['subname'] . "</td>
<td>" . $row['link'] . "</td>
<td>
<a href='a_deletere.php?id=$row[id]'> Delete </a>
</td>
</tr>";
}}
else{
echo "something went wrong.";
}
?>
</table><br><br><style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
tr:hover {background-color: coral;}</style>
</div><button><a bgcolor="red" href="a_mainadmin.php " class="BACK">BACK</a></button>
</body>
</html>