I'm making a basic site with PHP. Here, I have code that will not work. I want to redirect a page to another page.
<?php
$k = mysqli_connect("localhost","root","","ubm_2015");
if(!$k)
{
echo "Koneksi Gagal <br>";
echo mysqli_errno();
}
else
{ echo "Koneksi Berhasil";
}
$nama = $_POST['nama'];
$motor = $_POST['vhc'];
$hobi = $_POST['hobi'];
$query = "insert into data_mhs(nama,motor,hobi) values ('$nama','$motor','$hobi')";
mysqli_query($k,$query);
echo " Query Berhasil ";
header("Location : select.php");
?>
I use header
, but it's not working.
Are there any tips to redirect in PHP?