-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.php
More file actions
68 lines (44 loc) · 1.56 KB
/
form.php
File metadata and controls
68 lines (44 loc) · 1.56 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
<!doctype html>
<header>
<h1>Formulir Pendaftaran
</header>
<?php
// $servername = "sql107.epizy.com";
// $username = "epiz_32958231";
// $password = "RMEb9Ncjmv0";
// $dbname = "epiz_32958231_pendaftaran";
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "baitulquran";
/// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `tugas`";
$result = $conn->query($sql);
if ($conn->query($sql) === TRUE) {
} else {
}
$conn->close();
?>
<?php
echo "<form action=\"http://localhost/belajar_php/update.php\" method=\"POST\">";
$row = $result->fetch_assoc();
?>
<label>Nama Lengkap</label><br>
<input type="text" name="Nama Lengkap" value="<?php echo $row ["Nama Lengkap"] ?>"><br>
<label>Tempat Tgl Lahir</label><br>
<input type="text" name="Tempat Tgl Lahir" value="<?php echo $row ["Tempat Tgl Lahir"] ?>"><br>
<label>Jenis Kelamin</label><br>
<input type="text" name="Jenis Kelamin" value="<?php echo $row ["Jenis Kelamin"] ?>"><br>
<label>No.telp</label><br>
<input type="text" name="No.telp" value="<?php echo $row ["No.telp"] ?>"><br>
<label></label>No.telp ortu<br>
<input type="text" name="No.telp ortu" value="<?php echo $row ["No.telp ortu"] ?>"><br>
<label>Alamat Lengkap</label><br>
<input type="text" name="Alamat Lengkap" value="<?php echo $row ["Alamat Lengkap"] ?>"><br>
<input type="submit" value="kirim">
</form>