Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'connection.php';
- ?>
- <html>
- <head>
- <title>Login</title>
- <link rel="stylesheet" type="text/css" href="style/account-style.css">
- </head>
- <body>
- <div class="wrapper-input" align="center">
- <div class="box-input" >
- <div class="title-box">
- Daftar
- </div>
- <div class="content-box">
- <form method="post" action="">
- <input type="text" name="txt_name" class="txt" placeholder="Nama Lengkap">
- <input type="text" name="txt_email" class="txt" placeholder="Email">
- <input type="text" name="txt_username" class="txt" placeholder="Username">
- <input type="password" name="txt_password" class="txt" placeholder="Password">
- <input type="submit" name="btn_register" class="btn-input" value="Daftar">
- </form>
- <?php
- @$txt_name = $_POST['txt_name'];
- @$txt_email = $_POST['txt_email'];
- @$txt_username = $_POST['txt_username'];
- @$txt_password = $_POST['txt_password'];
- @$btn_register = $_POST['btn_register'];
- if($btn_register){
- if($txt_name=="" || $txt_email=="" || $txt_username=="" || $txt_password==""){
- echo "Mohon Lengkapi Form";
- } else {
- $q_insert = mysql_query("INSERT INTO tbl_user SET nama_user='$txt_name', email_user='$txt_email', username_user='$txt_username', password_user='$txt_password'") or die(mysql_error());
- if($q_insert){
- echo "Pendaftaran Berhasil";
- } else {
- echo "Pendaftaran Gagal";
- }
- }
- }
- ?>
- </div>
- <div class="text-box">
- Sudah Punya Akun? <a href="login.php">Login</a>
- </div>
- </div>
- <div class="footer-box">
- <a href="../lks">Home</a>
- <br>
- © 2015 Richy-Tech
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement