-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRegistrasi admin.php
More file actions
53 lines (47 loc) · 1.34 KB
/
Registrasi admin.php
File metadata and controls
53 lines (47 loc) · 1.34 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
<?php
session_start();
require 'function.php';
if (isset($_POST["register"])) {
if (Registrasi($_POST) > 0) {
echo "<script>
alert('user baru berhasil ditambahkan');
</script>";
$_SESSION["Login"] = true;
header("Location: Halaman admin.php");
exit;
} else {
echo mysqli_error($db);
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registrasion</title>
<link rel="stylesheet" href="Registrasi.css">
</head>
<body>
<h1>Registrasi Admin</h1>
<form action="" method="post" autocomplete="off">
<ul>
<li>
<label for="username">Username :</label>
<input type="text" name="username" id="username" required>
</li>
<li>
<label for="password">Password :</label>
<input type="password" name="password" id="password" required>
</li>
<li>
<label for="password2">Konfirmasi Password :</label>
<input type="password" name="password2" id="password2" required>
</li>
<li>
<button type="submit" name="register">Submit</button>
</li>
</ul>
</form>
</body>
</html>