View Full Version : I need people to be able to Upload Images to my website

05-11-2004, 08:43 PM
I'm new to coding and need help!

I just need people to be able to upload an image or images to my site. I've found that I need to use a FileField Object but I'm not sure how to set this all up so it actually functions.

Does anyone have a quick explaination or an example I could work from?? Any help would be greatly appreciated!

Thanks so much!
Kelly Jane

Roy Sinclair
05-11-2004, 08:57 PM
Cross posted: http://www.codingforums.com/showthread.php?t=38419

05-11-2004, 09:44 PM
This would require a php script. You need to first install a local webhost on your network. I would suggest Abyss (http://www.aprelium.com) Web Server. Then you need to download the php windows binaries and install them. You can get these from www.php.net . After you install those, you need to configure Abyss Web Server, then create your php script.


$file = $_POST['file'];
$to = "./uploads";

$msg = "Your file, $file, was uploaded successfully to the directory $to!";
$ermsg = "Your file, $file, could not be uploaded to the directory $to!";

if (copy ($file, $to)){

unlink ($file);


This is some code that may work for what you want. You do have to edit the variables, and in your form, name the file input, "file".

05-11-2004, 11:46 PM
Is there any simpler way? Such as creating a form with an action that will upload the file into a folder I create??

05-12-2004, 01:13 AM
Is there any simpler way? Such as creating a form with an action that will upload the file into a folder I create??

Nope. You could also get a free web server (good one at www.codes4u.com I think), and upload your files there. But in your form, your form, you would creat ethe form tags something like this:

<form method="post" action="./*THE PHP FILE*.php">



That is the only way to upload files. You must use a server side script such as php. You can get more information on the php coding language at http://www.php.net, and I great starter book that I recommend would be:

PHP for the world wide web
By Larry Ullman
ISBN: 0-201-72787-0

If your willing to spend $20 to learn it.. :D

05-12-2004, 01:47 AM
This isnt entirely true, I believe you can use a form, and use the mailto: method, however this isnt really the best way to go compared to a server side script.

05-13-2004, 12:10 AM
Thank you for your help! :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum