Okay this is the whole sha-bang (#!?) What happens, as you'll see, is that I do some manipulation to the photo with ImageMagick down the road, and then eventually add the info (the person is updating or creating a profile) to a db table, and obviously, I need the varname that I created when I stripped out all of the junk from the file name:
if (!$photo) copy($photo, "/home/user/public_html/memberfiles/$photo_name"); // image magick start // let's make sure the uploaded file isn't gigantic $size = GetImageSize( "/home/user/public_html/memberfiles/$photo_name" ); if ($size[0] > 500 || $size[1] > 500) { if($size[0] > $size[1]) { $large_width = 500; $large_height = (int)(500 * $size[1] / $size[0]); } else { $large_width = (int)(500 * $size[0] / $size[1]); $large_height = 500; } $imagemagickPath = "/usr/local/bin"; exec("$imagemagickPath/convert -geometry " . "{$large_width}x{$large_height} " . "/home/user/public_html/memberfiles/$photo_name /home/user/public_html/memberfiles/$photo_name"); } // Let's Make a Thumbnail size $size = GetImageSize( "/home/user/public_html/memberfiles/$photo_name" ); if ($size[0] > 125 || $size[1] > 125) { if($size[0] > $size[1]) { $thumbnail_width = 125; $thumbnail_height = (int)(125 * $size[1] / $size[0]); } else { $thumbnail_width = (int)(125 * $size[0] / $size[1]); $thumbnail_height = 125; } $imagemagickPath = "/usr/local/bin"; exec("$imagemagickPath/convert -geometry " . "{$thumbnail_width}x{$thumbnail_height} " . "/home/user/public_html/memberfiles/$photo_name /home/user/public_html/memberfiles/tb_$photo_name"); // image magkck end $photo=$photo_name; } } if ($update=mysql_query("UPDATE members SET first='$first', last='$last', birthyear='$birthyear', email='$email', password='$password', photo='$photo', (etc. with the MySQL insert) --- In php-list@yahoogroups.com, Brian Cummiskey <[EMAIL PROTECTED]> wrote: > Patrick Bierans wrote: > >>have you looked at the manual? http://www.php.net/copy has pretty much > >>everything you need to know is there... > > > > > > Sorry, but copy() is the wrong function for that. > > Better use moveuploadedfile() for security reasons: > > > > http://php.net/move-uploaded-file > > > > I agree- but she said she wanted a COPY of the file, not to move it > somewhere. the move-uploaded-file function will copy, write to new > file/directory, then destroy the original. > > We need to see the full code, Marian, to help you further. ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hailj32/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123872196/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/