Jump to content


Photo

File Upload Values after Validation


  • Please log in to reply
1 reply to this topic

#1 fohanlon

fohanlon
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 22 June 2006 - 02:16 PM

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.


#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 22 June 2006 - 02:35 PM

I don't think the file input type supports a value attribute unfortunately...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users