-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathidentitas.php
More file actions
79 lines (70 loc) · 3.79 KB
/
identitas.php
File metadata and controls
79 lines (70 loc) · 3.79 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
72
73
74
75
76
77
78
79
<?php include 'structure/check_conn.php';
include 'database.php' ;
global $conn;
global $id_siswa;
// Execute SQL query
$result = mysqli_query($conn, "SELECT * FROM siswa WHERE id_siswa = $id_siswa");
// Fetch data
$user = mysqli_fetch_assoc($result);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/classless.css">
<link rel="stylesheet" href="css/tabbox.css">
<link rel="stylesheet" href="css/themes.css">
<title>Edubridge - Edit Identitas</title>
</head>
<body>
<header>
<?php include 'structure/navbar.php'; ?>
</header>
<main>
<h1>Edit Identitas</h1>
<p>Anda dapat mengubah informasi identitas Anda di sini.</p>
<form action="identitas.php" method="post">
<fieldset>
<label for="nama_siswa">Nama</label>
<input type="text" name="nama_siswa" id="nama_siswa" value="<?php echo $user['nama_siswa']; ?>" required disabled>
<button type="button" onclick="document.getElementById('nama_siswa').disabled = false;">Edit</button>
<br><br>
<label for="email">Alamat Email</label>
<input type="email" name="email" id="email" value="<?php echo $user['email']; ?>" required disabled>
<button type="button" onclick="document.getElementById('email').disabled = false;">Edit</button>
<br><br>
<label for="password">Sandi</label>
<input type="password" name="password" id="password" required disabled>
<button type="button" onclick="document.getElementById('password').disabled = false;">Edit</button>
<br><br>
<label for="tanggal_lahir">Tanggal Lahir</label>
<input type="date" name="tanggal_lahir" id="tanggal_lahir" value="<?php echo $user['tanggal_lahir']; ?>" required disabled>
<button type="button" onclick="document.getElementById('tanggal_lahir').disabled = false;">Edit</button>
<br><br>
<label for="kelas">Kelas</label>
<select name="kelas" id="kelas" required disabled>
<option value="10" <?php if ($user['kelas'] == 10) echo 'selected'; ?>>10</option>
<option value="11" <?php if ($user['kelas'] == 11) echo 'selected'; ?>>11</option>
<option value="12" <?php if ($user['kelas'] == 12) echo 'selected'; ?>>12</option>
</select>
<button type="button" onclick="document.getElementById('kelas').disabled = false;">Edit</button>
<br><br>
<label for="asal_sekolah">Asal Sekolah</label>
<input type="text" name="asal_sekolah" id="asal_sekolah" value="<?php echo $user['asal_sekolah']; ?>" required disabled>
<button type="button" onclick="document.getElementById('asal_sekolah').disabled = false;">Edit</button>
<br><br>
<label for="jenis_kelamin">Jenis Kelamin:</label><br>
<input type="radio" id="Pria" name="jenis_kelamin" value="Pria" <?php if ($user['jenis_kelamin'] == 'Pria') echo 'checked'; ?> disabled>
<label for="Pria">Pria</label><br>
<input type="radio" id="Wanita" name="jenis_kelamin" value="Wanita" <?php if ($user['jenis_kelamin'] == 'Wanita') echo 'checked'; ?> disabled>
<label for="Wanita">Wanita</label><br>
<button type="button" onclick="document.getElementById('Pria').disabled = false; document.getElementById('Wanita').disabled = false;">Edit</button>
<br><br>
<button type="submit">Update</button>
</fieldset>
</form>
</main>
<footer><?php include 'structure/footer.php'; ?></footer>