I ahve seen many people are stugling with this. I hope this script helps. It may need debugging a bit.
why not visit my site at www.cdheaton.c.uk
###########################################
<head>
<title> Testing tables </title>
</head>
<?php
$file_dir = "temp/";
$file_url = "images/";
if ( isset ($fupload ))
{
print "path: $fupload<br>\n";
print "name: $fupload_name<br>\n";
print "size: $fupload_size bytes<br>\n";
print "type: $fupload_type<p>\n\n";
if ( $fupload_type == "image/gif" || "image/jpg")
{
copy ( $fupload, "$file_dir/$fupload_name") or die ("Could`nt Copy");
print "<img src=\"$file_url/$fupload_name\" height=700px width=700px><p>\n\n";
}
}
?>
<body>
<p>Welcome to the picture uploading session.</p>
<br>
<form enctype="multipart/form-data" action="<?php $PHP_SELF ?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
<input type="file" name="fupload"><br>
<input type="submit" value="Lets go">
</form>
</body