HighDots Forums  

PHP Image Upload x 2

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss PHP Image Upload x 2 in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
alwaysabitlost
 
Posts: n/a

Default PHP Image Upload x 2 - 07-09-2004 , 06:21 PM






Hi Guys

I'm trying to set up a single page that uploads data for a product by the
user. I want them to be able to add two images, different sizes, renamed to
match the prod_id number, and upload those at the same time. Now I can submit
the normal text fields fine, grab the mysql_insert_id, make the column data
"1.jpg" and "1big.jpg" fine, but I don't understand how the whole tmp file
works with PHP so I'm having trouble actually renaming the two files and
copying them to my images folder as I've no idea how to locate them?

Anyone got any pointers?

Thanks.


Reply With Quote
  #2  
Old   
Michael Fesser
 
Posts: n/a

Default Re: PHP Image Upload x 2 - 07-09-2004 , 10:15 PM






.oO(alwaysabitlost)

Quote:
I'm trying to set up a single page that uploads data for a product by the
user. I want them to be able to add two images, different sizes, renamed to
match the prod_id number, and upload those at the same time. Now I can submit
the normal text fields fine, grab the mysql_insert_id, make the column data
"1.jpg" and "1big.jpg" fine, but I don't understand how the whole tmp file
works with PHP so I'm having trouble actually renaming the two files and
copying them to my images folder as I've no idea how to locate them?
Have a look at

Chapter 19. Handling file uploads
http://www.php.net/manual/en/features.file-upload.php

for explanations and an example.

HTH
Micha


Reply With Quote
  #3  
Old   
alwaysabitlost
 
Posts: n/a

Default Re: PHP Image Upload x 2 - 07-10-2004 , 08:09 AM



Thanks for that info. Several rewrites of the php file and I finally
discovered I'd changed the enctype on the form to the right type but hadn't
bothered to upload the changes, so it wasn't even grabbing the files...

I don't do things by halves me you know...


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.