Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created May 25, 2013 10:31
Show Gist options
  • Select an option

  • Save INDIAN2020/5648632 to your computer and use it in GitHub Desktop.

Select an option

Save INDIAN2020/5648632 to your computer and use it in GitHub Desktop.
php: checkbox value validation
if (!empty($_POST)) {
if (!empty($_POST['save'])) {
$active = isset($_POST['showcancelled']) && $_POST['showcancelled'] ? "1" : "0";
if ($active == 1) {
echo "Checked";
} else {
echo "fail";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment