Commit 8df00903 by Visgha Olivia

Upload New File

parent 57dc4fa3
<?php
require_once 'common/database.php';
global $db;
// $id_akun = $_POST['id_akun'];
$nama = $_POST['nama'];
$username = $_POST['username'];
$pass = $_POST['password'];
$repass = $_POST['repassword'];
$email = $_POST['email'];
$role = 2;
if($pass != $repass){
echo "<script>alert('Password tidak sama.');
window.location = 'regis.php'</script>";
}
else if($_POST['t1'] != $_SESSION['my_captcha']){
echo "<script>alert('Captcha tidak sesuai.');
window.location = 'regis.php'</script>";
}
else{
$is_account_exist = CekAkun($username);
if($is_account_exist > 0){
echo "<script>alert('Username Sudah Dipakai');
window.location = 'regis.php'</script>";
}
else{
$do = AddAkun($nama,$username,$pass,$email,$role);
if($do < 0){
echo "<script>alert('Akun Berhasil Dibuat.');
window.location = 'index.php'</script>";
}
else{
echo "<script>alert('Akun Gagal Dibuat.');
window.location = 'index.php'</script>";
}
}
}
?>
\ No newline at end of file
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