I'm stuck with silly problem.
I'm retriving data from db and depending on query, returns number of data.
On first page is form with one text field with value 'kolicina' and one hidden field with value 'id'.
Code: Select all
<?
echo "<input name=\"id[]\" type=\"text\" id=\"kolicina\" size=\"5\" maxlength=\"2\" value=\"$kolicina\">";
echo "<input type=\"hidden\" name=\"id2[]\" value=\"$id\">";
?>On second page is code wich is getting (POST) values of array
Code: Select all
<?
if (!empty($_POST['id']))
{
echo "Kolicina: " . "<br>\n";
foreach ($_POST['id2'] as $checkbox => $id )
{
$array = explode ($_POST['id']);
echo $id . " - " . $array . "<br>\n";
}
}
?>