|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > filenames = picture names |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|