| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|PhP to upload images|
| 1:50 am on Mar 16, 2001 (gmt 0)|
I just need a simple way for clients to upload an image and write a sentence or two underneath it. I have scoured HotScripts and resourceindex and gotten close but no cigar.
Any body got a script like this?
| 9:57 pm on Mar 19, 2001 (gmt 0)|
I've not got one to hand, but when you call a php script from an upload form [cgi-lib.berkeley.edu], php creates a variable using the name you gave to your <input type="file"> field.
This variable contains the path to the uploaded file - from there it'd be a pretty simple matter to move the file to somewhere more permanent and reference it from HTML.
| 11:14 pm on Mar 19, 2001 (gmt 0)|
I used this simple uploadform in an admin section for a travelsite I developed, it works and is easy to modify to your own needs.
It should work if you set the directory to have write permission (and php is not running in safe mode)
Hope this helps!
| 4:44 pm on Mar 20, 2001 (gmt 0)|
I must be in "ForRest Gump" mode again. Will have to wait for the brain juice to flow again but at least now I have something to jump right into.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved