Mailer.php tutorial

There is a mailer.php tutorial that has a code to
check if the check box on the form is checked

Is there a way to do the same check if the text box next to the checkbox has any values or empty

sample code to check the checkbox

foreach($_POST[‘check’] as $value) {
$check_msg .= "Checked: $value
";
}