Just a guess, but is the file you are uploading larger than 3000 bytes? If so, then what you are seeing is normal since PHP is rejecting it because it's too large.
-philip On Wed, 1 May 2002, Nick Wilson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * and then 1LT John W. Holmes declared.... > > Say it with me... "Show me the code!" No, louder! Yeah...that's good... > > Sorry, i figured it would be something someone would spot immediately. > here is the form.... > > /* add_teacher_form() */ > function add_teacher_form() { > > global $teach; > > $output=<<<EOF > <h2>Please enter the teachers details</h2> > <form enctype="multipart/form-data" action="$PHP_SELF?mode=add&action=verify" >method="post" > > > <input type="hidden" name="MAX_FILE_SIZE" value="3000" /> > > <p><strong>Name:</strong><br /> > <input type="text" name="name" value="$teach->name" /></p> > > <p><strong>Address:</strong><br /> > <input type="text" name="address" value="$teach->address" /></p> > > <p><strong>Tel:</strong><br /> > <input type="text" name="tel" value="$teach->tel" /></p> > > <p><strong>Fax:</strong><br /> > <input type="text" name="fax" value="$teach->fax" /></p> > > <p><strong>Email:</strong><br /> > <input type="text" name="email" value="$teach->email" /></p> > > <p><strong>Bio:</strong><br /> > <textarea name="bio" cols="40" rows="5">$teach->bio</textarea></p> > > <p><strong>Upload photo:</strong><br /> > <input name="userfile" type="file" /></p> > > <input type="submit" value="Preview before entering" /> > </form> > EOF; > return $output; > } > > > and this is what I'm testing with: > > if($HTTP_POST_FILES) { > foreach($HTTP_POST_FILES['userfile'] as $key => $val) { > print("---- ".$key."----".$val."<br />"); > } > print("and here is the userfile -- $userfile"); > > > it displays: > > - ----name ---- somepic.jpg > - ----type ---- image/jpg > - ----temp_name ---- none > - ----size ---- 0 > > and the userfile is --- none > > > Hope that is a little clearer! > - -- > Nick Wilson // www.explodingnet.com > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE80EbIHpvrrTa6L5oRAvBEAJ9RC4IzMDO9DreWLXs5WdsGezErxACgkMg3 > YvnyL0EViA7KQJGSkTAAk3U= > =D8oD > -----END PGP SIGNATURE----- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php