i have a situation. i hope im clear abt this.
i need to post multiple set of data elements into php.
each set consists of data elements of text, textarea, radio buttons,
checkboxes and even a file(image).
most fields are optional.
all sets are not subset of each other but belongs to the same universal
set.
all these sets of data elements are posted using one single form
and this form will only display at most 3 set of form elements input at
one time.
the user of course can do more than 3. by declaring how many he/she
wants before landing on this page.
meaning if user chose 4 , the form display 3 sets. User submits and the
form will again appear with one set this time.
the form will not update the database till the user finishes number of
sets he/she had declared.
i only have problem with the (image) file data element.
this image file.. if existing , is stored into the database as blob.
questions:
1. if file is not declared, what does the file elements holds?... i
sometimes get null value, sometimes get "none"
2. does my logic works.. coz usually the file elements in the last form
post will work.. but the previous will be corrupted.
3. i try using file input elements as arrays.. meaning <input type=file
name=filearr[x]>.. doesn't work?
4.anyone know how to work around this... does anyone encounter problem
like these before?
thanks for any help....
john
here's what i do.... ignore any syntax error. this is just a stripdown
version of the code.. it is just for putting across the logic..
/////////////////////////////////////////////////////////////////////////////////
if($submit)
{
//loop to run thur all QuestDiax and convert into characters.
for ($j=0; $i < $index; $i++,$j++)
{
$filestr = "QuestDia".$j;
if($$filestr)
$diagram[$j] = addslashes(fread(fopen($$filestr,"r"),
filesize($$filestr)));
}//for
//insert into database
}//if submit
print "<form enctype=".." method = post ....>";
for($i=0; $i < 3; $i++)
{
print "<input type=\"file\" name=\"QuestDia".$i."\">";
}//for
print "</form>";
--
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]