$_FILES help!

From: Date: Tue, 27 May 2003 12:17:21 +0000
Subject: $_FILES help!
Groups: php.general 
Request: Send a blank email to php-general+get-149097@lists.php.net to get a copy of this message
Can someone please tell me what I'm doing wrong? The following code snippet works fine after uploading a file (value="myfile") <? foreach($_FILES as $key => $val) { echo "$key :<br>"; foreach ($val as $key2 => $val2) { echo "&nbsp;&nbsp;&nbsp;$key2: $val2<br>"; } } ?> and gives the output: myfile : name: doc++-3.4.9.zip type: tmp_name: error: 2 size: 0 But doing the following: <? echo "$_FILES["myfile"]["error"]";?> Gives the message: Parse error: parse error, expecting T_STRING' or T_VARIABLE' or `T_NUM_STRING' in /home/adam/public_html/php/uploadproc.php on line 7 Can someone tell me why this isn't working? I'm going nuts with this! Thanks in advance. Adam

« previous php.general (#149097) next »