if (isset ($_GET['type'])&& $_GET['type']=="send"){
if ($_FILES['userfile']['error']==0) {
/*echo 'File Name: '.$_FILES['userfile']['name'].'
';
echo 'File Type: '.$_FILES['userfile']['type'].'
';
echo 'File Size: '.$_FILES['userfile']['size'].'
';
echo 'Temporary Name: '.$_FILES['userfile']['tmp_name'].'
';*/
$tmpFile= $_FILES['userfile']['tmp_name'];
$newFile=getcwd().'/'.$_FILES['userfile']['name'];
if (move_uploaded_file($tmpFile, $newFile))
echo '
Your file is uploaded successfully.
';
else
echo '
An error occurred while uploading.
';
}else
echo 'An Error occuerd NO.: '.$_FILES['userfile']['error'].'
';
}
?>