What is the right way to begin validation for data sent by a multipart/form form. I'll be receiving a file and 1 text identifier from a hidden field.
I'm not asking how to check for file type and size and all else. I can do that. What I'm asking is: in a normal form I do this:
<?php
If ($_POST)
{
if (isset($_POST['myField]) && $_POST['myField'] == 1)
{
//Proceed
}else{
echo 'Error';
}
}
else
{
echo 'Some Error';
}
?>
What is the best way to do this when it comes to multipart/form data.