Advertisement
ayakachan

proses.php

Oct 10th, 2016
4,691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2. //Mengambil File Koneksi Database.
  3. include 'config/koneksi.php';
  4. //Ambil Data dari FORM
  5. $username = $_POST["username"];
  6. $password = md5($_POST["password"]);
  7. $email = $_POST["email"];
  8. $nama = $_POST["nama"];
  9. //Query INSERT ke DB
  10. $query = "INSERT INTO user VALUES ('$username', '$password', '$email', '$nama')";
  11. $hasil = mysql_query($query);
  12. if($hasil) {
  13.   header("Location: index.php?status=success");
  14. }else {
  15.   header("Location: index.php?status=failed");
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement