Re: [PHP] file upload / no tmp name or size?
Say it with me... Show me the code! No, louder! Yeah...that's good... What's my name? ---John Holmes... - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Wednesday, May 01, 2002 3:24 PM Subject: [PHP] file upload / no tmp name or size? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I've been reading through the php manual section on file uploads and cannot work out why I can get the *name* and *mime type* but not the temp name and filesize. It isn't being uploaded I guess and I suspect I'm suffering from an embarrasing oversight but cannot fathom it. a little nudge in the right direction would be great ;-) - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE80ED8HpvrrTa6L5oRAs9DAKCUn3lo47M7CVjDN0gJ4BlTSNYOiACeMdmz AiEDabgJXOUGhd9mWd9s0nk= =PKcA -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
Re: [PHP] file upload / no tmp name or size?
-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 h2Please enter the teachers details/h2 form enctype=multipart/form-data action=$PHP_SELF?mode=addaction=verify method=post input type=hidden name=MAX_FILE_SIZE value=3000 / pstrongName:/strongbr / input type=text name=name value=$teach-name //p pstrongAddress:/strongbr / input type=text name=address value=$teach-address //p pstrongTel:/strongbr / input type=text name=tel value=$teach-tel //p pstrongFax:/strongbr / input type=text name=fax value=$teach-fax //p pstrongEmail:/strongbr / input type=text name=email value=$teach-email //p pstrongBio:/strongbr / textarea name=bio cols=40 rows=5$teach-bio/textarea/p pstrongUpload photo:/strongbr / 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