I know it's going to get solved with Vincent on the case ;-) Here's the code:
<head>
<title>Uploading...</title>
</head>
<body>
<h3>Uploading file...<br><br></h3>
<?
if ($userfile=="none")
{
echo "Problem: no file selected";
exit;
}
if ($userfile_size==0)
{
echo "Problem: uploaded file is zero length";
exit;
}
if (!is_uploaded_file($userfile))
{
echo "Problem: file not uploaded";
exit;
}
if (!is_uploaded_file($userfile))
{
echo "Problem: possible file upload attack";
exit;
}
$img_array = getimagesize("$userfile");
$img_type = $img_array[2];
echo "type: $img_type<br>";
echo "File name: $userfile_name<br>";
/echo "type = $img_array[2]<br>";
echo "string: $img_array[3]<br>";/
$upfile = "/home/verlynia/www/toomanyprojects/picname.jpg";
if ( !copy($userfile, $upfile))
{
echo "Problem: could not copy file to directory. Please make sure it's name is unique.";
exit;
}
echo "userfile_name = $userfile_name<br>";
echo "userfile = $userfile<br>";
echo "upfile = $upfile<br>";
echo "<img src=picname.jpg><br>";
?>
</body>