syntax error, unexpected 'else' (T_ELSE) in C:\xampp\htdocs\latihan\Prosesdaftar.php on line 34
<?php
require_once("koneksi.php");
$username = $_POST['username'];
$pass = $_POST['password'];
$cekuser = mysql_query("SELECT * FROM user WHERE username = '$username'");
if(mysql_num_rows($cekuser) > 0) {
echo "Username Sudah Terdaftar!";
echo "Masih ada data yang kosong!";
echo '<a href="daftar.php">Back</a>';
} else {
if(!$username || !$pass) {
$simpan = mysql_query("INSERT INTO user(username, password) VALUES('$username','$pass')");
echo '<a href="daftar.php">Back</a>';
} else {
if($simpan) {
}
echo 'Pendaftaran Sukses, Silahkan <a href="login.php">Login</a>';
} else {
echo "Proses Gagal!";
}
}
?>
echo 'Pendaftaran Sukses, Silahkan <a href="login.php">Login</a>';
} else {
the problem is in the "else" what should i do?