Skip to content

Instantly share code, notes, and snippets.

@dice
Created August 20, 2012 06:37
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 dice/3401586 to your computer and use it in GitHub Desktop.
Save dice/3401586 to your computer and use it in GitHub Desktop.
PHP code snippet for FullCourt SMS Authentication Sample Code
function user_login($username, $submitted) {
// Retrieve the stored password
$stored = $_SESSION['password'];
// Compare the retrieved vs the stored password
if ($stored == $submitted) {
$message = "Hello and welcome back $username";
} else {
$message = "Sorry, that's an invalid username and password combination.";
}
// Clean up after ourselves
unset($_SESSION['username']);
unset($_SESSION['password']);
return $message;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment