Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 29th, 2006, 05:18 PM
Authorized User
 
Join Date: Mar 2005
Location: arima, West Indies, Trinidad and Tobago.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arimakidd
Default Problem with move_uploaded_file

I am having a problem with using the move_uploaded_file. I prefer to use this as I can send the image to a folder. I am creating web page where you can submit text and and image in a form and then it will be displayed. Thus the reason for using move_uploaded_file, I can send the image to the images folder and easily retrieve it. The problem is, you must specify a destination and filename. So when you call the function or object, not sure which it is, for the second time, the first image gets overwritten cause the name of the file in the destination is the same. What do I do so that I can repeatedly use the page without overwriting images. The page that processes the form is:
Code:
$file = '\images\some.gif';
  print("<pre>\n");
  move_uploaded_file($_FILES['img_pic']['tmp_name'], $file);
  print("File uploaded: ".$file."\n");
  print("</pre>\n");
As you can see I am in the testing phase.

Reply With Quote
  #2 (permalink)  
Old October 29th, 2006, 09:49 PM
Authorized User
 
Join Date: Mar 2005
Location: arima, West Indies, Trinidad and Tobago.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arimakidd
Default

This problem has been sweetly solved. WROX BOOKS ARE THE BEST. Chapter 7, Beginning PHP5, Apahce, MySQL Web Development. Excellent work.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 10:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.