For starters, PHP throws away any uploaded files when the script finishes to
avoid a denial of service attack where somebody can overflow your /tmp by
uploading over and over.
You have to copy the files in the first script, and pass *those* locations
on to your next page.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: John LYC <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Monday, February 26, 2001 11:04 PM
Subject: [PHP] image file prob
> hi..
> i have a form that allow users to upload several image files.
> every time they submit, i do fread them and assign them to an array...
> this array will be passed on until user confirmation.. then i insert
> into database as blob type....
>
> file://freed image file and assign to array.
> $diagram[$ind] =
>
addslashes(fread(fopen($HTTP_POST_FILES["QuestDia"]["tmp_name"][$ind],"r"),
>
> file://to facilitate posting of any existing array of the above to the
next
> form...
> for($ind=0;$ind < count($diagram);$ind++)
> print "<input type=\"hidden\" name=\"diagram[$ind]\"
> value=\"".$diagram[$ind]."\">";
>
> the script will bring user back to the form and allow them to upload
> more...
>
> the 2nd time round, i have got error..
> i see parts of $diagram being displayed out... meaning funny characters
> are displayed..
> once $diagram is insert into database,,, the pic is corrupted..
> it works fine if the form does not repeat.. meaning user post images and
> database is updated straight away.
> can someone tell me wat's wrong?
>
> john
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]