Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 25, 2019 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/4598afe3050a6dd112ddb7377bb17100 to your computer and use it in GitHub Desktop.
Save parzibyte/4598afe3050a6dd112ddb7377bb17100 to your computer and use it in GitHub Desktop.
Saber si checkbox fue marcado https://parzibyte.me/blog
<?php
$nombre = $_POST["nombre"];
echo "Hola, $nombre<br>";
# Para saber si el checkbox fue marcado
# comprobamos si existe en $_POST
if (isset($_POST["terminos_condiciones"])) {
echo "Aceptaste los términos :)";
} else {
echo "NO Aceptaste los términos :(";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment