I have a question about how to check if the form is empty.
My intention is not to check field by field, imagining that I can have N³³³ campos
.
I'm trying this way:
<form method="post" name="submit" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="input_txt"/>
<input type="text" name="input_txt2"/>
<input type="submit" name="sub_btn"/>
</form>
<?php
if(empty($_POST))
{
echo "empty";
}else
{
echo "no empty";
}
?>
However, the result is always no empty
.
How can I resolve this?