You don't even need to have it set to a separate value, really. On checkboxes, using:
if ( isset( $_POST[ 'uniqueID' ] ) ) {
would be sufficient.
Depending on exactly what you're trying to do, it may pay to have your 'unique IDs' to actually be something like 'checkbox[1]', 'checkbox[2]' etc. That way, in PHP you can use the $checkbox variable as an array. That is to say you could then use:
$checkbox = $_POST[ 'checkbox' ];
if ( isset( $checkbox[1] ) ) {
or even better would be to have your checkboxes all named that way and give each of them a value of '1'. That way (depending on your error level settings) you would just be able to do:
$checkbox = $_POST[ 'checkbox' ];
if ( $checkbox[1] ) {
Note, too, that you don't have to have numbers as the index. You could use field names like 'checkbox["UserHasACar"]', 'checkbox["userIsMale"]' etc. (I believe!).
For what it's worth, I don't see any way of moving variables based on their ID (as opposed to the field name) as that's just not how it works
Anyway, hopefully that will give you some ideas. Apologies if it doesn't: I'm only on my third coffee 
|