Skip to content

Instantly share code, notes, and snippets.

@warisali2
Last active March 16, 2018 09:59
Show Gist options
  • Save warisali2/3ea7e30fa4139d10bebd7905fd503f61 to your computer and use it in GitHub Desktop.
Save warisali2/3ea7e30fa4139d10bebd7905fd503f61 to your computer and use it in GitHub Desktop.
validateEmpty php funciton
function validateEmpty($var, $msg) {
if($var == "")
{
echo '<div class="alert alert-danger">'
echo '<strong>Error!</strong>' . $msg;
echo '</div>'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment