-
Notifications
You must be signed in to change notification settings - Fork 0
/
edittesting.php
42 lines (40 loc) · 1.59 KB
/
edittesting.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
<?php
require 'functions.php';
$id_testing = $_GET["id_testing"];
$detail_testing = query("SELECT * FROM `testing` WHERE id_testing = $id_testing");
$row = $detail_testing["0"];
$id_task = $row["id_task"];
if (isset($_POST["updtesting"])) {
if (updtesting($_POST) > 0) {
header("Location: index.php?halaman=detail_task&id_task=$id_task");
} else {
echo mysqli_error($conn);
}
}
?>
<div class="content-task">
<div class="halaman">
<h1>Detail Testing</h1>
</div>
</div>
<br>
<div class="detail">
<form action="" method="POST" enctype="multipart/form-data">
<label for="">Nama Task</label><br>
<input type="text" name="name_task" value="<?php echo $row["name_task"] ?>" required><br>
<label for="">Test Steps</label>
<textarea name="test_steps"><?= $row["test_steps"]; ?></textarea>
<label for="">Data Test</label>
<textarea name="test_data"><?= $row["test_data"]; ?></textarea>
<label for="">Expected Result</label>
<input type="text" name="exp_result" value="<?= $row["exp_result"]; ?>">
<label for="">Result</label>
<input type="text" name="result" value="<?= $row["result"]; ?>">
<label for="">Source</label><br> <br>
<img src="assets/img/<?= $row["source"]; ?>" style=" width: 50%; vertical-align:middle;" alt="<?php echo $row['source'] ?>"></td>
<input type="file" name="source"><input type="hidden" name="old" value="<?= $row["source"] ?>">
<button type=" submit" name="updtesting" class="newtask">Update Task</button>
<br>
<br>
</form>
</div>