Re: image file prob

From: Date: Thu, 01 Mar 2001 02:45:33 +0000
Subject: Re: image file prob
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42112@lists.php.net to get a copy of this message
thanks for the info... well..... what i did was to fread the files and store them using sessions variables..... at the end of the process. .. i do a walk thur the array and insert them into the DB... john John LYC wrote: > 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.... > > //freed image file and assign to array. > $diagram[$ind] = > > addslashes(fread(fopen($HTTP_POST_FILES["QuestDia"]["tmp_name"][$ind],"r"), > > //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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#42112) next »