What would be the difference between validating states in two ways:
if(!empty($_POST['miName']{
}
if($_POST['miName'] !== ""{
}
What would be the difference between validating states in two ways:
if(!empty($_POST['miName']{
}
if($_POST['miName'] !== ""{
}
With empty you can include this:
Quoting the response of @ J.Correa in the publication How and when are isset () and empty () used correctly?
And with ! == "" you are strictly comparing both sides for your VALUE and TYPE. The result will be true if VALUE or TYPE is inconsistent, in which you will be validating if in _ $ POST there is an empty string