This is a variation to similar string earlier.  Have been checking
books, online manuals, suggestions here - tutorials and such.

Having issues passing arrays in forms. I have been working on this a few
days and am stuck.  Am trying to pass cat[] and id[] with whatever
checkbox user checks.  cat[] works fine.  My id[] is hidden and am not
able to pass correctly.  cat[] will display correct item on second page
but idid[] just passes 12 (which is the number of initial items in the
result from query) - or it will display 1,2,3,4,5,6,7,8,9,10,11.

Does anyone have suggestions.  I have tried using submit hidden value
among other no avail.




page1.php  snipet

<form action="comp_page4.php" method="post">
for($knt = 0;$row = mysql_fetch_row($res); $knt++)
echo "<tr><td><input type=\"checkbox\" name=\"cat[]\" value =

echo "<input type = \"hidden\" name = \"id[]\" value = $row[0]>";


<input type="submit" value="Next">

comp_page4.php snipet

echo "Hello cat[0] and cat[1] ect...: $cat[0], $cat[1], $cat[2],
$cat[3], $cat[4], $cat[5], $cat[6], $cat[7], $cat[8], $cat[9], $cat[10],
echo "<br>";
echo "Here's id:  $id[0], $id[1], $id[2], $id[3], $id[4], $id[5],
$id[6], $id[7], $id[8], $id[9], $id[10], $id[11]";


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to