PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
danyboy
Forum Newbie
Posts: 2 Joined: Thu Apr 22, 2004 7:14 am
Post
by danyboy » Thu Apr 22, 2004 7:14 am
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.
kettle_drum
DevNet Resident
Posts: 1150 Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England
Post
by kettle_drum » Thu Apr 22, 2004 7:15 am
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>
danyboy
Forum Newbie
Posts: 2 Joined: Thu Apr 22, 2004 7:14 am
Post
by danyboy » Thu Apr 22, 2004 8:03 am
erm - nope still no joy
btw - does the first code i wrote work for you?
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Thu Apr 22, 2004 8:38 am
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