I use the following code fragments to upload images...
... to process the image
// Do we need to upload a file ?
if ($logo_name <> "") {
$fs = $file_size;
$uplogo = str_replace('\\','/',$logo);
$targetlogo = "eventimages/" . $eventID . strrchr ($logo_name, ".");
$imgsize = GetImageSize ($uplogo);
$imgerr="";
if ($imgsize[0] > 180) {
$imgerr = "Image width must be less than 180 pixels";
}
if ($imgsize[1] > 160) {
if ($imgerr == "") {
$imgerr = "Image height must be less than 160 pixels";
} else {
$imgerr = $imgerr . " and height must be less than 160 pixels";
}
}
if ($imgerr == "") {
copy ($uplogo , $targetlogo );
}
}
....
and this is the form that specifies the image file....
<form action="modify_event.phtml" method="post" ENCTYPE="multipart/form-data">
...
<td width="28%"><font size="2"><font face="Verdana, Arial, Helvetica, sans-serif" color="336699">Logo:</font></font></td>
<td width="72%">
<? if ($logo <> "") {
echo("<img src='".$logo."' alt='Enter new file to replace'><br>");
} ?>
<input type=file name="logo" value=""></td>
</tr>
<tr><td colspan=2><input type=submit value="Update">
</table>
</form>
.... hope this helps... code is used live at www.instantevents.net