Hello Everyone
My question is quite simple but more difficult to convert into the PHP and HTML code.
The idea is to upload a file to the server and email data from the form using one submit button.
The HTML Body looks like this:
<form "upload.php" method = "post" enctype = "multipart/form-data">
<input type="file" name="file">
<input type="submit" name="submit" value="Submit">
</form>
and PHP like this:
if(isset($_FILES['file']) OR ($_POST['email']))
{
code for upload a file......
code for email data......
if(empty($errors)==true)
{
move_uploaded_file($file_tmp,"/path/".$file_name);
<input type="email" id="email" name="email">
mail($recipient, $subject, $email_content, $email_headers);
echo "File uploaded";
}
}
So, How to now trigger to different issets, when one handle a āfileā that works only with $_FILES and another āemailā that works only with $_POST ?