Problems by transfer of arrayed formfield

Problems by transfer of arrayed formfield

am 12.02.2006 14:55:42 von Ruprecht Helms

--------------020207040401000504050600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi I have to scripts that should transfer values of a checkbox into
another script that put them out.
You see that the value of the checkbox is stored in a array-variable. By
putting out the value of
the arrayvariable there is no output. What can be wrong.

Enclosed the two scripts.

Regards,
Ruprecht

--------------020207040401000504050600
Content-Type: text/x-sql;
name="form_test.php"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="form_test.php"



Test



gesamt löchen   
for ($i=0;$i<=5;$i++)
{
echo "";
//$user_id = $aus_konto["kontoinp"];
//echo "";
}
?>





--------------020207040401000504050600
Content-Type: text/x-sql;
name="form_test2.php"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="form_test2.php"



Test



for ($i=0;$i<=5;$i++)
{
echo $aus_id[i];
}
//$user_id = $aus_konto["kontoinp"];
//echo "";
?>




--------------020207040401000504050600
Content-Type: text/plain; charset=us-ascii

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------020207040401000504050600--

Re: Problems by transfer of arrayed formfield

am 12.02.2006 15:11:13 von antispo

------=_Part_10833_7578823.1139753473466
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline





Test






for ($i=3D0;$i<=3D5;$i++)

{

echo $aus_id[i]; //try echo $_POST['$aus_id][$i=
]

}

//$user_id =3D $aus_konto["kontoinp"];

//echo "";

?>





------=_Part_10833_7578823.1139753473466--

Re: Problems by transfer of arrayed formfield

am 12.02.2006 20:57:59 von Ruprecht Helms

Hi antispo,

>
>
>
>
> Test
>
>
>
>
>
> >
> for ($i=0;$i<=5;$i++)
>
> {
>
> echo $aus_id[i]; //try echo $_POST['$aus_id][$i]
>
> }
>
> //$user_id = $aus_konto["kontoinp"];
>
> //echo "";
>
> ?>
>
>
>
>
>

Ok I clickt on the 1st and 3rd checkbox. I stored the value of $i as
value into the checkbox-array. The result should be 0 2, but I does not
get an result. The only I get is an empty page.

Regards,
Ruprecht

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Problems by transfer of arrayed formfield

am 12.02.2006 22:40:07 von antispo

------=_Part_14048_20788944.1139780407465
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

r1.php

>


>
> >
> for($i=3D1; $i<=3D5; $i++) {
> echo "";
> }
>
>
> ?>
>
>
>
>

>
r2.php


$ids =3D $_POST['ids'];

foreach ($ids as $i) {
$new_ids[] =3D $i;
}

print_r($new_ids);


?>

...iterate trough the submited array with foreach instead of for...

------=_Part_14048_20788944.1139780407465--

Re: Problems by transfer of arrayed formfield

am 13.02.2006 10:54:59 von Ruprecht Helms

Hi,

in the meentime I tried to look why the foreach-loops puts out an error.
I change the script with the checkboxes in this to look that the array
is filled correctly.



Test



gesamt löchen   
for ($i=0;$i<=5;$i++)
{
//echo "";

$ids[] = $i;

//$user_id = $aus_konto["kontoinp"];
//echo "";
}
?>




I still have problems with the foreach-loop
Here the actually error:
*Warning*: Invalid argument supplied for foreach() in
*/www/htdocs//form_test2.php* on line *11

Regards,
Ruprecht Helms
*

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php