<html>
<head>
<title>Upload image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$file_dir="/home/mysite/public_html/image";
$file_url="http://www.mysite.com/image";
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")
{
copy($fupload,"$file_dir/$fupload_name") or die ("Could not copy");
print "<img src=\"$file_url/$fupload_name\"><p>\n\n";
}
}
?>
<body>
<form enctypr="multipart/form-data" action="<?print $PHP_SELF ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
<input type="file" name="fupload"><br>
<input type="submit" value="upload">
</form>
</body>
</html>
Is there any problem in above script.It is neither uploading the images nor displaying the information about the image.Please help.
Thanks