hi there,
I've got a sticky one for me that I'm sure is very simple.
I've got some code that asks users to catogories their entries.
The form looks a bit like this.
<form name="update_btv_incs" method="post" action="update_soma_topics.php">
<INPUT TYPE="hidden" name="iona" value="video">
<INPUT TYPE="hidden" name="seshid" value="fc9c028e76b48bbaa01a9a9adb728743">
<INPUT TYPE="hidden" name="update_complete" value="Yes">
<INPUT TYPE="hidden" name="prefix" value="video">
<INPUT TYPE="hidden" name="edit" value="yes">
<INPUT TYPE="hidden" name="form" value="update_topics">
<input type="hidden" name="field_name_arr[0]" id="id" value="18">
<p>
<strong>Migration:
<br />
<br/>
<input id="Migration" type="checkbox" name="field_name_arr[1]" value="Yes" > <label for="Migration">Migration</label>
<p>
<strong>no_borders :
<br />
<input id="no_borders" type="checkbox" name="field_name_arr[2]"
value="Yes" > <label for="no_borders">no_borders</label>
<...and so on>
<input type="submit" name="Submit" value="Submit">
--//end form
I'm running register globals as off so i use the following code
$numrows = count($_POST['field_name_arr']);
//test
echo $numrows;
for ($i =0 ; $i < $numrows ; $i++)
{
$field_name_arr[$i] = $_POST['field_name_arr'][$i];
}
This really isn't working -
So the $numrows value is returned as the number of boxes that are ticked rather that the number of boxes in total.
Can anyone help?
Mickfuzz@rocketmail.com