| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|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.
© Webmaster World 1996-2013 all rights reserved