Commit aa81ef2b by Pratiwi Pandiangan

menambahkan fungsi untuk menambah user

parent 4b8f2272
<?php
$host="127.0.0.1";
$user="root";
$pass="";
$name="proyek";
$koneksi=mysql_connect($host,$user,$pass)or die("Koneksi ke database gagal!");
mysql_select_db($name,$koneksi)or die("Tidak ada database yang dipilih!");
$nama_lengkap = $_POST['namalengkap'];
$alamat = $_POST['alamat'];
$email = $_POST['email'];
$username = $_POST['username'];
$password = $_POST['password'];
mysql_query("insert into user (namalengkap, alamat, email, username, password) values('$nama_lengkap', '$alamat', '$email', '$username', '$password')");
header('Location: pengunjung.php');
?>
\ 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