Shnokey
Posts: 7
|
| Posted: 09/29/2004, 5:44 AM |
|
I have created a libray and an up-load page for MySQL and PHP. I currently have an area on the upload page to check a radio button to choose what type of document it is (.DOC, PDF) and that in turn places small icon next to the document link in the library. (just basically selects an image from the database) Now the end user can identify the document type by looking at the little icon. How can I have the up-load application look at the extension of the up-loaded document, and if the extension = .PDF - then place "pdf.gif " into the image area? - this way I dont have to have the library admin click on the document type. And the process would be much more professional.
Thanks for you help -
Jon
|
 |
 |
hidran
Posts: 29
|
| Posted: 09/29/2004, 6:21 AM |
|
You can use $_FILES[ 'file_variable_name']['type'] to detect the uploaded
file type
|
 |
 |
|