You could test if the checkbox variable name is set in $POST
PHP Code:
if(!isset($_POST["mycheck"])) {
echo "checkbox myckeck was not checked\n";
}
or from the previous example (with text_1, check_1; text_2, check_2...)
say for 8 couples of text input/checkbox beginning at number 1
PHP Code:
// store all in one array
$infos = Array();
for($i = 0; $i < 8; $i++) {
$key = $i + 1;
$infos[$i]["text"] = $_POST[$key];
if(isset($_POST["check_$key"])) {
$infos[$i]["checkbox"] = $_POST["check_$key"];
} else {
$infos[$i]["checkbox"] = "no-checked";
}
}
echo "<pre>\n";
print_r($infos);
echo "</pre>\n";