Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2006, 10:18 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Renaming uploaded multiple files sequentially

Hello all.

I'm working on a site that allows the optional upload of 5 images. Currently, those images are saved to the "upload" folder in my root directory. I want these images to be renamed as:

"the username_photo1"
"the username_photo2" (if there are two photos)
"the username_photo3" (if there are three photos)
"the username_photo4" (if there are four photos)
"the username_photo5" (if there are five photos)

I am using php/mysql server model, and I am using PurePHPupload to do the image uploading. Any help would be greatly appreciated!
 
Old January 15th, 2006, 12:44 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Where is your php code to upload the picture ? >.> <.<
 
Old January 15th, 2006, 05:45 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey there...I figured it out...thanks for posting tho!

 
Old January 15th, 2006, 09:12 PM
Authorized User
 
Join Date: Oct 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Could you post the code as looking for similar solution

Thanks
 
Old January 15th, 2006, 10:33 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, I decided not to rename the files. Instead, I stored the filename on the database and used that information to retrieve the file. I would very much like to do the rename thing, but I'm pressed for time and realized I could get along without it for now...

Good luck!






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mail uploaded files as an attachment jijish Classic ASP Professional 0 April 29th, 2008 03:35 PM
How can I play sequentially two .swf files?! kostas88 Javascript How-To 1 August 29th, 2007 06:09 AM
change the directory of uploaded files : jsp code Janoo JSP Basics 2 May 19th, 2007 06:06 AM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
How do i dl files that i have uploaded Beginner123 VB How-To 0 March 2nd, 2005 10:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.