I was testing the empty function in php, but it doesn't work, because the if statement is accessible whether the condition is false or true.
<?php
if(empty($_POST) === false){
echo 'text';
}
?>
<form action="index.php" method="post">
Username:
<input type="text" name="text">
<input type="submit" name="submit">
</form>
The echo is executed even if the input is empty.
Why ??
Aucun commentaire:
Enregistrer un commentaire