Cordial Greeting.
I hope you are well, and you can help me.
What I do is, I have an HTML form, which sends data by POST, to PHP, a field is an input of type file (input="file" >), and I receive it in PHP, what I want to validate is whether the varible comes with a file or not.
<form method="POST" action="php/archivo.php" id="frm_contact" name="frm_contact" enctype="multipart/form-data">
<input type="file" class="aweform" name="desprendible">
<input type="submit" class="myButton" id="btn-enviar" Value="Enviar">
</form>
/// --------------------- PHP File ----------------- //
$desprendible = $_FILES["desprendible"];
if(empty($desprendible)){
echo "No hay datos";
}else{
echo "Hay datos prro";
}
Please can you help me.
Thanks in advance.