Created
June 16, 2015 17:41
-
-
Save simonszu/6b5f1a3083bf039d6cb3 to your computer and use it in GitHub Desktop.
A password checker for PHP
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 | |
$username = "user"; | |
$password = "password"; | |
if ((!isset($_POST["user"])) && (!isset($_POST["pw"]))){ | |
echo "<form action=\"secure.php\" method=\"post\">"; | |
echo "username: <input type=\"text\" name=\"user\"><br />"; | |
echo "password: <input type=\"password\" name=\"pw\">"; | |
echo "<input type=\"submit\" value=\"Abschicken\">"; | |
echo "</form>"; | |
} | |
else if ((isset($_POST["user"])) && (isset($_POST["pw"])) && ($_POST["user"] == $username) && ($_POST["pw"] == $password)){ | |
echo "Hier steht sicheres zeug"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment