how would I do an if / else statement for such? the user has the option of adding images or not. if the add images, i want the if to run and if they dont I want the else to run because depending on whether or not the add an image they will have two different end.
if (isset($_POST['formsubmitted'])) {
if (isset($_POST['name'])){ }else{ }
if (isset($_POST['state'])){ }else{ }
if (isset($_FILES['images']['name'])) { echo 'images'; exit;} else {echo 'no images'; exit;}
} #end main form submitted
if (isset($_FILES['images']['name'])) dosnt work because as of now even when no images are submitted it still says images submitted.
the html file fields are:
<form>
<input type='file' name='images[]' id=''>
<input type='file' name='images[]' id=''>
<input type='file' name='images[]' id=''>
<input type = "submit">
</form>