Hi I am sory if make your job hard but please be paitient with me, I didn't know what mean by <php></php> but now i know. the problem the code doesn't show any problem but does not output any thing (not uploding) I did check the php ini file for state of uploading it was 'on' and max_file_size is 2m any way the files which i tried very small, coul you help.
PHP Code:<html>
<head><title>Upload File</title></head>
<body>
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
//handle the form
if(isset($_POST['submit']))
{
//try to move the upload file
if(move_uploaded_file($_FILES['thefile']['tmp_name'], "../uploads/
{$_FILES['thefile']['name']}")){
print '<p> Your file has been uploaded</p>';
}else
{
//problem
print '<p> the file could not uploaded';
//print message depend on the error
switch($_FILES['thefile']['error'])
{
case 1:
print 'The file exceeeds the upoad _maximum filesize setting in php ini';
break;
case 2:
print 'The file exceeeds the upoad _maximum filesize setting in html form';
break;
case 3:
print 'The file was only patialy uploed';
break;
case 4:
print 'no file uploded';
break;
}
print '</b>.</p>';
}
}
?>
<form action="uplo.php" enctype="multipart/form-data" method="POST">
<p>Upload File using the Form</p>
<input type="hidden" name="MAX_FILE_SIZE" value="30000"/>
<input type="file" name="thefile"/>
</br></br>
<input type="submit" value="Upload"/>
</p>
</form>
</body>
</html>




Reply With Quote