Page 1 of 1

*SOLVED*whats wrong?

Posted: Tue Mar 16, 2004 1:51 pm
by Deemo
once again i come to you guy for help :D

this code seems right, but it doesnt work, because it returns nothin
page 1

Code: Select all

<input name='userfile' type='file'class='textbody' value='Browse...'>
</td></tr>
<tr>
<td colspan='2' height='25' align='center'>
  <input name='Submit' type='image' value='Submit' src='submit.gif'>
      </td>
thats just a section of my form, that works fine, but when i click on the submit button which is supposed to take me to page and display the name of the fill in the Browse box, it returns nothing. here is what i have in page2
page2

Code: Select all

<?php
echo $_FILES['userfile']['name'];    //Should echo the name of the file right???
?>
nothing is returned. i have read the entire documentation on php.net on $_FILES and i have used code from there and i am clueless

thanks
Deemo

Posted: Tue Mar 16, 2004 2:07 pm
by xisle
make sure your form tag includes
ENCTYPE="multipart/form-data"

also try phpinfo() to see what is being posted

Posted: Tue Mar 16, 2004 2:13 pm
by Deemo
there we go, thank you very much :)