| Posted by Big Moxy on 08/11/07 02:18 
This is stupid but I don't see the problem. I get a blank page when Isubmit this form. The files that I am using for testing are all less
 than 50 KB in size.
 
 Any insight is appreciated!!
 
 <form enctype="multipart/form-data" action="image_upload.php"
 method="POST">
 <table width="100%" border="0" cellpadding="3">
 <tr>
 <td> </td>
 </tr>
 <tr>
 <td><!-- The data encoding type, enctype, MUST be specified as
 below -->
 <!-- MAX_FILE_SIZE must precede the file input field -->
 <input type="hidden" name="MAX_FILE_SIZE" value="50000" />
 <!-- Name of input element determines name in $_FILES array -->
 Choose a file to upload:
 <input name="userfile" type="file" size="40" />
 </td>
 </tr>
 <tr>
 <td align="center"><input type="submit" name="Submit" id="Submit"
 value="Upload" /></td>
 </tr>
 </table>
 </form>
 
 Here is image_upload.php -
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
 www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Upload Image</title>
 </head>
 <?php
 error_reporting(E_ALL);
 $uploaddir = "d:\domains\test.com\wwwroot\casper\uploads\";
 $uploadfile = $uploaddir . basename($_FILES["userfile"]["name"]);
 if ($_FILES["userfile"]["error"] > 0)
 {
 echo "Return Code: " . $_FILES["userfile"]["error"] . "<br />";
 }
 else
 {
 echo "No errors" . "<br />";
 echo $uploaddir  . "<br />";
 echo $uploadfile  . "<br />";
 }
 ?>
 <body>
 </body>
 </html>
 [Back to original message] |