Hi
This is my first attempt at creating a script that uploads a file. The problem is it aint working, is there any chance that someone can check this for me.
This is the form, it is ment to send it to the same page.
<form name="form1" method="post" action="Upload2.php">
<pre class="Small-Tahoma">
Select Banner Image
<input name="imagefile" type="file" class="Form-Box-Lite" id="imagefile">
<input name="maximumsize" type="hidden" id="maximumsize" value="15000">
Size of Banner
<select name="filetypesize" size="1" class="Form-Box-Lite"><option value="460">460 * 60</option></select>
<input name="Submit" type="submit" class="Form-Box-Lite" value="Upload"></pre>
</form>
& This is the php that i am using to try and upload
<?php
$Userfile = $HTTP_POST_FILES['imagefile'] ['tmp_name'];
$Originalname = $HTTP_POST_FILES['imagefile'] ['name'];
$Filesize = $HTTP_POST_FILES['imagefile'] ['size'];
$Filetype = $HTTP_POST_FILES['imagefile'] ['type'];
$Error = $HTTP_POST_FILES['imagefile'] ['error'];
$Size = $HTTP_POST_VARS['maximumsize'];
$filetypesize = $HTTP_POST_VARS['filetypesize'];
if ($Size >15000)
{
echo "file too big";
exit;
}
$Upload = '/uploads/'.$Userfile;
?>