-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodifyKeyword.php
More file actions
57 lines (41 loc) · 1.45 KB
/
modifyKeyword.php
File metadata and controls
57 lines (41 loc) · 1.45 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
<?php $page_title = 'Modify Keyword'; ?>
<?php include('header.php'); ?>
<div class="container">
<?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="modifyTheKeyword.php" method="POST" enctype="multipart/form-data">
<br>
<h3>Modify Keyword: '.$row["keyword"].'? </h3> <br>
<div>
<label for="id">ID</label>
<input type="text" class="form-control" name="id" value="'.$row["id"].'" maxlength="5" style=width:400px readonly><br>
</div>
<div>
<label for="name">keyword</label>
<input type="text" class="form-control" name="keyword" value="'.$row["keyword"].'" maxlength="255" style=width:400px required><br>
</div>
<br>
<div class="text-left">
<a href="keywords_list.php" class="btn btn-secondary btn-md align-items-center">Cancel</a>
<button type="submit" name="submit" class="btn btn-primary btn-md align-items-center">Modify Keyword</button>
</div>
<br> <br>
</form>';
}//end while
}//end if
else {
echo "0 results";
}//end else*/
?>
</div>