blunder
04-20-2007, 05:22 PM
I have a form, where I display a number of different radio buttons based on the data in a table. The problem is however when I want to redisplay the form and I just cant figure it out. I already start having problems when i want to run through the information and check if it is ok. How the heck :)
The form input comes from the form named "cat_$id", where $id is a number from 1 to 40. How do I then collect the data being sent as POST?
$sqltext = "SELECT id FROM cats WHERE type='".$postarray["type"]."' ORDER BY name";
$result = mysql_query($sqltext);
$i = 0;
while ($row = mysql_fetch_array($result)) {
$id = $row["id"];
if ($cat_.$id == 1) {
$postarray["cat_".$id] = 1;
$i++;
}
}
Anyone able to help or point me in the right direction?
The form input comes from the form named "cat_$id", where $id is a number from 1 to 40. How do I then collect the data being sent as POST?
$sqltext = "SELECT id FROM cats WHERE type='".$postarray["type"]."' ORDER BY name";
$result = mysql_query($sqltext);
$i = 0;
while ($row = mysql_fetch_array($result)) {
$id = $row["id"];
if ($cat_.$id == 1) {
$postarray["cat_".$id] = 1;
$i++;
}
}
Anyone able to help or point me in the right direction?
