if (!empty) {}
bölümünün ardından ELSE AÇIKLAMASI YAPILIR.Neden bu PHP kodu koşulu çalışmıyorsa?
<form action="first.php" method ="post">
<input type="text" name="username" >Username</br>
<input type="password" name="password" >Password</br>
<input type="submit" value="Submit"></br>
</form>
<?php
if (isset($_POST['username'])&& isset($_POST['password'])) {
if (!empty($user) && !empty($pass)) {
$user = $_POST['username'];
$pass = $_POST['password'];
if ($user ==="habib" && $pass === "1234") {
echo $user;
echo $pass;
} else {
echo "wrong password and username";
}
}
}
?>
Bu, php kodu değil. –
Sadece html ve 'if else 'ifadesi yok –
Ayrıca bu phpmyadmin' ile ilgisi yok. – arkascha