<?php
$host="127.0.0.1";
$user="root";
$pass="";
$name="p1d3ti08_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: login.php');
?>