Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PhP to upload images



1:50 am on Mar 16, 2001 (gmt 0)

10+ Year Member

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)

WebmasterWorld Senior Member 10+ Year Member

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)

10+ Year Member


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)

10+ Year Member

Thanks guys.

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.


Featured Threads

Hot Threads This Week

Hot Threads This Month