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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.