Upload New File

parent 6282e913
<?php
session_start();
require_once('common/dbconfig.php');
if(isset($_POST["submit"])){
// alert
if(register($_POST) > 0){
if ($_SESSION['captcha'] == $_POST['captcha']) {
// code...
echo "
<script>
alert('Selamat! Akun berhasil di daftar!');
document.location.href = 'index.php';
</script>
";
}else{
echo "
<script>
alert('Akun gagal di daftar. Coba lagi!');
document.location.href = 'register.php';
</script>
";
}
}else{
echo "
<script>
alert('Akun gagal di daftar. Coba lagi!');
document.location.href = 'register.php';
</script>
";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="public/css/login.css">
<link rel="icon" type="image/png" href="public/img/logoTravel.png" />
<title>Register Page</title>
</head>
<body>
<h1>Selamat Datang di Pendaftaran<br/> Travel OK</h1>
<div class="kotak_login">
<center>
<img src="public/img/logoTravel.png" width="100px;">
</center>
<form action="" method="post">
<label for="nama">Nama Lengkap</label>
<input type="text" name="nama" id="nama" class="form_login" placeholder="Nama Anda" required="required" autocomplete="off" autofocus>
<label for="email">Email</label>
<input type="email" name="email" id="email" class="form_login" placeholder="Nama Anda" required="required" autocomplete="off">
<label for="alamat">Alamat</label>
<input type="text" name="alamat" id="alamat" class="form_login" placeholder="Nama Anda" required="required" autocomplete="off">
<label for="j_kelamin">Jenis Kelamin</label>
<select class="form_login" name="j_kelamin">
<option value="Laki-laki">Laki-laki</option>
<option value="Perempuan">Perempuan</option>
</select>
<label for="username">Username</label>
<input type="text" name="username" id="username" class="form_login" placeholder="Username" required="required" autocomplete="off">
<label for="password">Password</label>
<input type="password" name="password" id="password" class="form_login" placeholder="Password .." required="required" autocomplete="off">
<label for="password">Captcha:</label>
<input type="text" name="captcha" maxlength="4" required="required" autocomplete="off">
<br><br>
<center>
<img src="captcha.php"><br>
</center>
<button type="submit" name="submit" class="tombol_login">Daftar</button>
<!-- <input type="submit" name="register" class="tombol_login" value="DAFTAR"><br><br> -->
<a href="index.php"> <button type="button" name="button" >Kembali</button> </a>
</center>
</form>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment