I have run into a problem with the $_FILES global and reloading a 
form when the user has omitted required information. Reloading the 
$_POST variables is no problem. But the form among other things 
offers the user a chance to upload a photo, and it is reloading that 
$_FILE information where I'm not succeeding. The relevant code is this:

<input name="photo1" type="file" class="style1" value="<?= 
$_FILES['photo1']['name'] ?>" />

print_r( $_FILES ) shows that $_FILES['photo1']['name'] exists, but 
it's not being shown in the input field.  What am I doing wrong?

Further than that, the name that exists is not fully qualified, so 
even if it were being displayed, I presume it wouldn't do any good 
upon the eventual successful submission of the form. How can I solve that?

By the way, it all works perfectly when the form doesn't need to be reloaded.


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses 

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to