Jump to content

Question RE: $_FILES


onlyican

Recommended Posts

Hey people

Happy New Year to you all.

I have a question

I have a form, with a file field
<input type='file' name='x_file' />

The form is validated

If they forget something, then the form is reloaded, all text fields are filled in using $_POST
BUT
You can not give $_FILES a value

So I thought I would store the data for $_FILES into a variable, and parse in the form
All the data got parsed across no problems,
BUT
now
the tmp_name does not exists, as the file has been deleted.

Any suggestions on how to make the tmp_name last a bit longer (temp uploaded image)
or another way of doing this

I dont really want to upload the image till they have completed the form
Link to comment
https://forums.phpfreaks.com/topic/32589-question-re-_files/
Share on other sites

Thanks, I will have a little think
Using Sessions or cookies will not work, as the tmp upload image only last a short period of time, which is what is causing the error.
I did originaly have the file upload seperate, but my boss did not like that idea
I am seeing him tomorrow, I will have a word.

Cheers guys

Link to comment
https://forums.phpfreaks.com/topic/32589-question-re-_files/#findComment-151789
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.