Created
May 3, 2014 02:36
-
-
Save caioerick/9876958d53d9ba96df53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$idade = 15; | |
function validar($email) { | |
if($idade > 18) { | |
return true; | |
} | |
else { | |
return false; | |
} | |
} | |
if(validar($idade) == true) { | |
echo "<span style='color: #00B118;'>Você pode visitar o nosso site</span>"; | |
} | |
else { | |
echo "<span style='color: #E50000;'>Infelizmente, Você não pode visitar o nosso site</span>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment