General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 20th, 2003, 03:05 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
filenames = picture names

alright I have a form which allows the user to upload a picture. As it stands, I have a box that the user must type the name of the file in to retrieve the picture. Is there a way to just use the name that is submitted as a file instead of making the user type it out? I can't think of how to do this, since the type submitted is file rathar than text.
__________________
hey it's the CHARKING

Reply With Quote
  #2  
Old July 20th, 2003, 10:28 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Charking,

I'm assuming you're using PHP, right?

Mitch wrote a great article on Blobbing data to a database. Even though you may not be writing your files to a database, you can still take the information from the article and put it towards saving the files in a directory.

You can keep the filename the user specifies, although, by using this form type:

Code:
<form method="post" action="whatever.php" enctype="multipart/form-data">


It will allow you to use the actual filename the user uploads (that form declaration puts the "browse" box whereby the user can use the file-chooser to select their file.

PHP temporarily stores the file using a temp-filename in the "tmp" directory specified in the PHP.ini file. What you need to do is process the temp file so that it will be renamed to the original filename the user selected.

This may sound a little confusing right now, but Mitch's article will clear many of the confusions right up!

Hope that helps...
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old July 21st, 2003, 04:03 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
thanks

Thanks a lot, I figured it out. Although I had read the blobbing thing... and had already decided to simply use the file as an upload into a folder, I figured out to jsut put the $_FILE as $strPicName. It works well thanks a lot.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > filenames = picture names


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT