*SOLVED*whats wrong?

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

Post Reply
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

*SOLVED*whats wrong?

Post 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
Last edited by Deemo on Tue Mar 16, 2004 2:13 pm, edited 1 time in total.
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

make sure your form tag includes
ENCTYPE="multipart/form-data"

also try phpinfo() to see what is being posted
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

there we go, thank you very much :)
Post Reply