-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
64 lines (56 loc) · 1.46 KB
/
register.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
$title = "Register - ";
require_once("partials/header.php");
if(isset($_SESSION['user'])) {
header("Location: index.php");
}
?>
<center>
<h1>Register User</h1>
</center>
<form action="sendEmail.php" method="post" enctype="multipart/form-data">
<fieldset>
<legend>Register Form:</legend>
<?php if(isset($_GET['success'])) {
$message = $_GET['success'] == "true" ? "Register berhasil. silahkan konfrimasi akun." : "Gagal register. pastikan sudah mengisi data dengan benar.";
echo "<font color=\"red\">".$message."</font>";
}
?>
<?php if(isset($_SESSION['message'])) {
$message = $_SESSION['message'];
echo "<br/><font color=\"red\">".$message."</font>";
unset($_SESSION['message']);
}
?>
<div>
<label>Nama</label> <br />
<input type="text" placeholder="Nama" name="nama">
</div>
<br/>
<div>
<label>Email</label> <br />
<input type="text" placeholder="Email" name="email">
</div>
<br/>
<div>
<label>Avatar</label> <br />
<input type="file" name="avatar">
</div>
<br/>
<div>
<label>Username</label> <br />
<input type="text" placeholder="Username" name="username">
</div>
<br/>
<div>
<label>Password</label> <br />
<input type="password" placeholder="Password" name="password">
</div>
<br/>
<button type="submit" name="register">Register</button> |
<a href="login.php">Login</a> |
<a href="index.php">Halaman Utama</a>
</fieldset>
</form>
<?php
require_once("partials/footer.php");