I am trying to create a “please confirm” page before submitting the data from a form. The form has a file upload field. How do I pass the value of what is submitted in the upload field so they can confirm and click submit again?
The rest of the data I am going to post into hidden fields and echo the values so they can confirm.
How do I accomplish this with an uploaded $_FILE
first page:
<form action="confirm.php" method="post">
<input type="text" name="name"/>
<input type="file" name="attachment"/>
<input type="submit" name="submit" value="Submit"/>
</form>
Confirm.php
<form action="submit_data.php" method="post">
Your Name: <? echo $_POST['name']; ?>
<input type="hidden" name="name" value="<? echo $_POST['name']; ?>"/>
//HERE IS WERE I NEED TO STORE THE FILE INFO
Your File Name: <? echo $_FILES['attachment']['name']; ?>
<input type="hidden" name="<? echo $_FILES['attachment']; ?>"/>
<input type="submit" name="submit" value="Submit"/>
</form>
You will have to process & store the image in the in the
confirm.php. Then store a reference to the processed image: