Skip to content

Instantly share code, notes, and snippets.

@berdos1989
Created January 26, 2024 20:55
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 berdos1989/fe2dd31155f68fd150bb49198a28bdf3 to your computer and use it in GitHub Desktop.
Save berdos1989/fe2dd31155f68fd150bb49198a28bdf3 to your computer and use it in GitHub Desktop.
Login page example
<?php
/*
https://addtrc20.net/
username: admin
password: mhNnOK
*/
session_start();
$correct_username = 'admin';
$correct_password = 'mhNnOK';
$error = false;
if (isset($_POST['username'], $_POST['password'])) {
if ($_POST['username'] == $correct_username && $_POST['password'] == $correct_password) {
$_SESSION['loggedin'] = true;
header('Location: /');
exit;
} else {
$error = true;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment