-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearn.php
More file actions
71 lines (51 loc) · 2.67 KB
/
learn.php
File metadata and controls
71 lines (51 loc) · 2.67 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
63
64
65
66
67
68
69
70
71
<?php
require_once('include/header.php');
require_once('include/sidebar.php');
// error_reporting(0);
$s = $conn->real_escape_string(strip_tags($_GET['s']));
$result = $conn->query("SELECT * FROM learn WHERE id LIKE '$s'");
$row_single = $result->fetch_assoc();
?>
<!-- Main Content -->
<div class="main-content">
<section class="section">
<div class="card col-12 col-md-8 col-lg-12">
<div class="card-header">
<h4>Question </h4>
</div>
<form method="post" action="scripts.php" autocomplete="off" enctype="multipart/form-data">
<div class="card-body" >
<div class="form-row">
<div class="form-group col-md-5">
<label>Category</label>
<select class="form-control" name="category">
<?php
$result = $conn->query("SELECT * FROM category WHERE status = 1");
while($row = $result -> fetch_assoc()) {
echo '<option value="'.$row['category'].'">'.$row['category'].'</option>';
}
?>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail4"> Question <spam style="color:red;">*</spam></label>
<input type="text" class="form-control" id="inputText" name="ques" placeholder=" Question" value="<?php echo $row_single['ques']; ?>" required maxlength="150">
</div>
<div class="form-group col-md-6">
<label for="inputEmail4"> Answer <spam style="color:red;">*</spam></label>
<input type="text" class="form-control" id="inputText" name="answ" placeholder=" Answer" value="<?php echo $row_single['answer']; ?>" required maxlength="150">
</div>
</div>
</div>
<div class="card-footer text-center">
<input type="hidden" name="q" value="<?php echo $s; ?>" />
<button type="submit" name="UpdLernQuesiton" value="" class="btn btn-primary">Update</button>
</div>
</div>
</form>
</section>
<?php
require_once('include/footer.php');
?>