Commit 424a1f0d by Roy Junedi Simamora

perbaikan form daftar

parent 865fa461
<?php
include('koneksi.php');
include 'common/header.php';
//menginisiasi variabel-variabel yang dikirimkan dari form-->input name
//fix problem : undefined index...
......@@ -36,17 +37,20 @@
if($cek_username == 0){//jika nama tidak ditemukan/belum terdaftar
//lakukan penambahan data
$id = $countData +1;
mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO member VALUES($id,'$nama','$address','$hp','$uname','$pass','$email')");
echo "pendaftaran berhasil";
mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO member VALUES('$id','$nama','$address','$hp','$uname','$pass','$email', '1')");
echo "<div class='alert'> <h2> Pendaftaran Berhasil </h2> </div>";
echo "<a href='form_daftar.php' class='btn btn-primary'> <span class='glyphicon glyphicon-chevron-left'></span> Kembali </a>";
}else{
echo "<h2> username pengguna sudah terdaftar. Silahkan ganti username anda</h2>";
echo "<a href='form_daftar.php'>Kembali ke halaman pendaftaran</a>";
echo "<a href='form_daftar.php' class='btn btn-info'>Kembali ke halaman pendaftaran</a>";
}
}else{
//jika kata sandi tidak sama
echo "kata sandi tidak sama";
echo "<a href='pendaftaran.php'>Kembali ke halaman pendaftaran</a>";
echo "<h2>Kata Sandi Tidak Cocok</h2>";
echo "<a href='form_daftar.php' class='btn btn-info'>Kembali </a>";
}
echo '<br/> <br/>';
include 'common/footer.php';
?>
\ No newline at end of file
......@@ -2,6 +2,7 @@
require_once(dirname(__FILE__).'/koneksi.php');
require_once(dirname(__FILE__).'/common/header.php');
?>
<br/>
<form class="well form-horizontal" action="cek_daftar.php" method="post" id="contact_form">
<fieldset>
<legend>Member Registration</legend>
......
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