edit.php
Sndivrgwn26
php
2 years ago
1.2 kB
51
Indexable
<?php $config = mysqli_connect('localhost', 'root', '', 'eskul'); if ((!$config)) { # code... echo "error"; die(); } $query = 'SELECT * FROM anggota Where no = '. $_GET['id']; $datas = mysqli_query($config, $query); $anggota = $datas -> fetch_array(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <a href="index.php">home</a> <form action="add.php" method="POST"> <input type="hidden" value="<?= $anggota['no'] ?>" name="no"> <input type="text" value="<?= $anggota['nama'] ?>"name="nama" placeholder="masukan nama"> <input type="text" value="<?= $anggota['kelas'] ?>"name="kelas" placeholder="masukan kelas"> <input type="text" value="<?= $anggota['jurusan'] ?>"name="jurusan" placeholder="masukan jurusan"> <input type="text" value="<?= $anggota['nis'] ?>"name="nis" placeholder="masukan nis"> <button type="submit">simpan data</button> </form> </body> </html>
Editor is loading...