Re: Cannot use [] for reading...

From: Date: Tue, 27 Jun 2000 20:42:29 +0000
Subject: Re: Cannot use [] for reading...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3443@lists.php.net to get a copy of this message
At 22:01 27.06.00 +0800, you wrote:
Hopefully someone's run into this and figured it out... HTML that worked perfectly fine in PHP 3.0.13: <form action="/scripts/process.php" method=post enctype="multipart/form-data"> ... (lots snipped) <input name="file[]" type="file" size="35" value="<? echo $file[]?>"><br> <- (line 43) ... now yields: Fatal error: Cannot use [] for reading in /usr/local/apache/htdocs/fftc/library/admin/add_bulletin.html on line 43. What's the proper syntax for multiple file uploads? Philip
according to marc, also for me this makes no sense. If you want to load multiple files, try to have their names set in $file=array("file1","file2.... for($i=0;$i < sizeof($file); $i++) {
        <input type"hidden" name"bla$i" value=" <? echo $file[$i]; ?>"
} <button="submit".....> and on the next page load all files or make an array which values are the filenames and pass the array ..href="elswherpage?files=<?echo $file) to be read as above hope this helps Oliver

« previous php.general (#3443) next »