Two things you gotta do:
Firstly, you need a form that contains an INPUT TYPE=FILE. This form needs to be of enctype=multipart/form-data.
Secondly, you need a script which actually handles the uploaded file. The file will be uploaded to your server's temporary directory, so you'll need to move it or copy it from there (PHP has a built-in function for this although I don't remember what it's called coz I just copy it). You'll need to learn to use $HTTP_POST_FILES (or $_FILES, i think it's called, on more recent PHP versions) to handle file uploads.
I usually try to avoid giving direct code samples to people, as I feel it hinders the learning process
but this is a small snippet I used for a client's website:
Code:
$size = $HTTP_POST_FILES['userfile']['size'];
if ($HTTP_POST_FILES['userfile'] != '' && $size > 0) {
copy($HTTP_POST_FILES['userfile']['tmp_name'], "/home/prestige/public_html/upload/incoming.jpg") or die("Couldn't copy the file!");
} else {
die ("There was an error uploading your file. Please try again. If this error persists, contact the system administrator.");
}
'userfile' was the name of the INPUT TYPE=FILE on the form. Most of this is easy to figure out, actually.
Hope this gets you started in the right direction
I'd knock on wood, but my desk is particle board.