-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeleteKeyword.php
More file actions
64 lines (45 loc) · 1.51 KB
/
Copy pathdeleteKeyword.php
File metadata and controls
64 lines (45 loc) · 1.51 KB
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
<?php $page_title = 'Quiz Master > Delete Keyword'; ?>
<?php include('header.php');
$page="keywords_list.php";
/*verifyLogin($page);*/
?>
<div class="container">
<style>#title {text-align: center; color: darkgoldenrod;}</style>
<?php
include_once 'db_configuration.php';
if (isset($_GET['keyword'])){
$keyword = $_GET['keyword'];
$sql = "SELECT * FROM keywords
WHERE keyword = '$keyword'";
if (!$result = $db->query($sql)) {
die ('There was an error running query[' . $connection->error . ']');
}//end if
}//end if
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<form action="deleteTheKeyword.php" method="POST">
<br>
<h2 id="title">Delete Keyword</h2><br>
<h3>Delete Keyword: '.$row["keyword"].' </h3> <br>
<div class="form-group col-md-4">
<label for="id">Id</label>
<input type="text" class="form-control" name="id" value="'.$row["id"].'" maxlength="5" readonly>
</div>
<div class="form-group col-md-8">
<label for="name">Keyword</label>
<input type="text" class="form-control" name="keyword" value="'.$row["keyword"].'" maxlength="255" readonly>
</div>
<br>
<div class="text-left">
<button type="submit" name="submit" class="btn btn-primary btn-md align-items-center">Confirm Delete Keyword</button>
</div>
<br> <br>
</form>';
}//end while
}//end if
else {
echo "0 results";
}//end else
?>
</div>