Advertisement
Guest User

Untitled

a guest
Dec 25th, 2012
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. $nama = $_POST['nama'];
  3. $email = $_POST['email'];
  4. $password = $_POST['password'];
  5. $c_password = $_POST['c_password'];
  6. if($password != $c_password)
  7. {
  8. print "<script>alert('Konfirmasi password harus sama dengan password !');
  9. javascript:history.go(-1);</script>";
  10. exit;
  11. }
  12. if((!empty($nama)) && (!empty($email)) && (!empty($password)))
  13. {
  14. $query = mysql_query("INSERT INTO $table (nama,email,password)
  15. values ('$nama','$email','$password');");
  16. print "Registrasi success<br><a href=index.php><font color=blue>Back to
  17. Home</font></a>";
  18. }
  19. else
  20. {
  21. print "<script>alert('Maaf, tidak boleh ada field yang kosong !');
  22. javascript:history.go(-1);</script>";
  23. }
  24. ?>
  25. <?php mysql_close($connect); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement