Bobafart
03-02-2008, 09:37 PM
can't upload files.. can someone help pls?
<?php
if (isset($_POST['createUserGroup_x'])) {
echo 'this output displays when the form is submitted';
var_dump($_FILES); // this is empty -- why? I uploaded a file which was only 12 kb!
if(isset($_FILES['uploadedfile']['name'])){
echo 'nothing in here outputs because $_FILES is empty';
}
echo 'the remainder of my form outputs down here';
}
// what am I doing wrong?
?>
<form action="" method="post" id="commentform" name="commentform">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" name="uploadedfile" size="30" />
<input id="createUserGroup" name="createUserGroup" type="image" src="/img/icons/icon_submit.gif" />
</form>
<?php
if (isset($_POST['createUserGroup_x'])) {
echo 'this output displays when the form is submitted';
var_dump($_FILES); // this is empty -- why? I uploaded a file which was only 12 kb!
if(isset($_FILES['uploadedfile']['name'])){
echo 'nothing in here outputs because $_FILES is empty';
}
echo 'the remainder of my form outputs down here';
}
// what am I doing wrong?
?>
<form action="" method="post" id="commentform" name="commentform">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" name="uploadedfile" size="30" />
<input id="createUserGroup" name="createUserGroup" type="image" src="/img/icons/icon_submit.gif" />
</form>