Created
October 26, 2017 18:22
-
-
Save PrivateGER/d1dbffe5e420c89e516f29aa33de9913 to your computer and use it in GitHub Desktop.
Easy Coding - Simple Login PHP
This file contains hidden or 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 | |
$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