Skip to content

Instantly share code, notes, and snippets.

@PrivateGER
Created October 26, 2017 18:22
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 PrivateGER/d1dbffe5e420c89e516f29aa33de9913 to your computer and use it in GitHub Desktop.
Save PrivateGER/d1dbffe5e420c89e516f29aa33de9913 to your computer and use it in GitHub Desktop.
Easy Coding - Simple Login PHP
<?php
$sentname = $_POST["username"];
$sentpassword = $_POST["password"];
$failed = false;
if ($sentname == "EasyCoding") {
if ($sentpassword == "EasyCodingPW") {
echo "Logged in successfully!";
//Insert Code to be executed on successful Login here
}
else {
$failed = true;
}
}
else {
$failed = true;
}
//Check if "failed" is true
if ($failed == true) {
echo "Login failed!";
//Insert Code to be executed on failed login here
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment