Jump to content

File Upload Values after Validation


fohanlon

Recommended Posts

Hi Guys

Again I need some help. I have 4 input file field set to name "photos[]"

I also have other field on the form and before submission I use php to check for errors etc.

What I would like to be able to do is keep/display the full path the user would have chosen using the browse buttons if there are errors caused by other field entries on the form. Basically to save the user having to browse to the iamge again.

Can this be done?

I understand the file name is got using $_FILES['photos']['name'][0] etc but waht would get the path so that I could do somethig like this:

<input name="photos[]" type="file" class="formitems" id="photos[]" size="50" value="<?php echo

// the full local path as entered by the uuser using the browse button before form submission

?>">

Many thanks,

Fergal.
Link to comment
https://forums.phpfreaks.com/topic/12634-file-upload-values-after-validation/
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.