I have this code below that gives the following error:
Could Not Copy, Wrong Filetype (greenplaid.jpg)
Could Not Copy, Wrong Filetype (woodback.gif)
Any Suggestions?
thanks
<form name="form1" method="post" action="" enctype="multipart/form-data">
<input type="file" name="imagefile">image 1<br>
<input type="file" name="imagefile1">image 2<br>
<br>
<input type="submit" name="Submit" value="Submit">
<input type="Reset" name="Reset" value="Reset">
<?php
if(isset( $Submit ))
{
if ($_FILES['imagefile']['type'] == "image/jpg" && $_FILES['imagefile1']['type'] == "image/gif" )
{
copy ($_FILES['imagefile']['tmp_name'], "../woodshelves/".$_FILES['imagefile']['name'])
or die ("Could not copy");
copy ($_FILES['imagefile1']['tmp_name'], "../woodshelves/".$_FILES['imagefile1']['name'])
or die ("Could not copy");
echo "Copy Done....";
}
else
{
echo "<br><br>";
echo "Could Not Copy, Wrong Filetype (".$FILES['imagefile']['name'].")<br>";
echo "Could Not Copy, Wrong Filetype (".$FILES['imagefile1']['name'].")<br>";
}
}
?>
</form>