Uploading Files
Posted: Wed Nov 02, 2005 10:28 am
This dosnt seem to work right...
add.php
add2.php
keeps saying going to the else and saying failure... not sure whats going wrong
add.php
Code: Select all
<form enctype=\'image/gif\' action=\'add2.php\' method=\'POST\'>
<input type=\'hidden\' name=\'MAX_FILE_SIZE\' value=\'70000\' />
Send this file: <input class=\'text\' name=\'userfile\' type=\'file\' />
<input class=\'text\' type=\'submit\' value=\'Send File\' />
</form>add2.php
Code: Select all
<?php
$uploaddir = '/home/rootbee/public_html/vividgamers/iconrush/icons/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo 'Success';
} else {
echo 'Failure';
}
print "</pre>";
?>