Input name attribute plus PHP POST issue

Hello! I’m building some form inputs on the fly with PHP. Simple enough, done it hundreds of times, blah blah, etc. However, all of the inputs of type “checkbox” refuse to post. They show up fine in the page source, but when I inspect all the $_POST keys after the data is posted, they don’t show up. Here’s the code:

[php]
echo(’



‘.$row[1].’

















');[/php]

Which prints to HTML as such:

<tr>
	<td class="tdalt">
		29-40
	</td>
	<td class="tdalt">
		<input type="text" size="50" name="parLevel1">
	</td>
	<td class="tdalt">
	<input type="text" size="2" name="02Count1">
	</td>
	<td class="tdalt">
		<input type="checkbox" name="chartsPickedUp1">
	</td>
	<td class="tdalt">
		<input type="checkbox" name="narcsOK1">
	</td>
	<td class="tdalt">
		<textarea name="roundsComments1" rows=3 cols=40></textarea>
	</td>
</tr>

But when I hit submit, I get the following error on the page the data is posted to:

Notice: Undefined index: chartsPickedUp1 in C:\inetpub\wwwroot\shiftreport\execAdd.php on line 87 Notice: Undefined index: narcsOK1 in C:\inetpub\wwwroot\shiftreport\execAdd.php on line 87

Only the checkboxes don’t come through. And if I print out all the $_POST data, they are indeed nowhere to be found. I don’t see any typos or anything.

Any thoughts?

Oh god, I’m a moron. Unchecked boxes do not post. Mods, please delete my shame, haha.

Sponsor our Newsletter | Privacy Policy | Terms of Service