Page 1 of 1
Simple PHP upload problem
Posted: Thu Apr 22, 2004 7:14 am
by danyboy
Code: Select all
<?php
echo $POST['file1']['size'];
?>
<form action="test.php" method="POST" enctype="mulipart/form-data">
<input type="file" name="file1">
<br>
<input type="submit" value="Upload">
</form>
Basically - nothing happens - I've copied this code from a book, checked google, asked a friend and still no idea why there is no output from this.
Any help would be greatly appreciated - thanks.
Posted: Thu Apr 22, 2004 7:15 am
by kettle_drum
Try:
Code: Select all
<?php
echo $_FILES['file1']['size'];
?>
<form action="test.php" method="POST" enctype="mulipart/form-data">
<input type="file" name="file1">
<br>
<input type="submit" value="Upload">
</form>
Posted: Thu Apr 22, 2004 8:03 am
by danyboy
erm - nope still no joy
btw - does the first code i wrote work for you?
Posted: Thu Apr 22, 2004 8:38 am
by twigletmac
Try doing:
Code: Select all
echo '<pre>';
print_r($_FILES);
echo '</pre>';
and let us know if you get any output when you submit the page.
Mac