Validasi Register di Pemrogaman PHP
<?phpinclude "koneksi.php";
$sk=$_POST['sk'];
$nama_paud=$_POST['nama_paud'];
$password=$_POST['password'];
$email=$_POST['email'];
echo $nama_paud;
if (($sk=='' || $nama_paud=='') || ($password=='' || $email=='') )
{
echo "<p align='center'>semua tidak boleh null</p>";
echo "<p align='center'><a href='register.php'>Kembali</a></p>";
}
else
{
$sql=mysql_query("insert into login values('$sk','$nama_paud','$password','$email')");
if ($sql){
echo "Berhasil Login </br>" ;
echo" <p align=center>berhasil<a href='login.php'>Login</a></p>";
}
else
{
echo" <p align=center>GAGAL<a href='register.php'>ulangi</a></p>";
}
}
?>
No comments:
Post a Comment