Uploading two images

images php coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
Beady
New php-forum User
New php-forum User
Posts: 6
Joined: Sat Jan 04, 2003 3:30 am
Location: UK
Contact:

Uploading two images

Post by Beady » Thu Aug 21, 2003 4:07 am

I need to be able to allow the user to select just one image file and upload both it and a similarly named file.
For example if the user selects castelon.jpg, then that file and thcastelon.jpg should both be uploaded.
I can do a single upload but can someone get me started on uploading both please.

Thanks

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Post by swirlee » Thu Aug 21, 2003 6:05 am

You can only do a POST upload with files that the user explicitly chooses. If you want two files to be uploaded, the user must explicitly choose both files, individually. This is for security reasons, and very good ones at that. The only possibility would be, perhaps, to use JavaScript to automatically fill in the filename of the second file based on that of the first, but I don't even know if that's allowed for file upload fields.

Beady
New php-forum User
New php-forum User
Posts: 6
Joined: Sat Jan 04, 2003 3:30 am
Location: UK
Contact:

Post by Beady » Thu Aug 21, 2003 7:28 am

Thanks for that. I was beginning to suspect that it couldn't easily be done. I'll have to look for a work around.

Regards
Bernard Davis

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest