Hi everyone,
Can anyone help with this please? I've got a little script that should upload files, however when I submit the form my progress bar just hangs, it worked before but doesn't now.. is there a logical reason for this?
THanks for any help
<html>
<head>
<title>Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="<?=$PHP_SELF?>" method="post" enctype="multipart/form-data" name="upload" id="upload">
<b><font size="2" face="Arial, Helvetica, sans-serif">Please select a file to
upload from your hard drive<br>
</font></b><font size="2" face="Arial, Helvetica, sans-serif">Note: .jpg, .jpeg
and .gif files only.</font><br>
<input type="file" name="imagefile">
<br>
<input type="submit" name="Submit" value="Upload">
</form>
<?
if(isset( $Submit ))
{
if ($_FILES['imagefile']['type']=="image/gif" || $_FILES['imagefile']['type']=="image/jpeg" || $_FILES['imagefile']['type']=="image/pjpeg"){
copy ($_FILES['imagefile']['tmp_name'], "/home/ohms/public_html/images/upload/".$_FILES['imagefile']['name'])
or die ("Could not copy");
?>
<p><font size="2" face="Arial, Helvetica, sans-serif">Your file '<?=$_FILES['imagefile']['name']?>' was uploaded sucessfully. Copy and paste the code below to where you wish to put it on the web site.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b><img src="[url]http://www.domain.com/images/upload/[/url]<?=$_FILES['imagefile']['name']?>"></b></font></p>
<?
}
else {
echo "<p>Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")</p>";
}
}
?>
</body>
</html>