Files
web/includes/functions.php
T
2025-03-06 23:08:52 -07:00

31 lines
586 B
PHP
Executable File

<?php
include_once('sql.php');
function authorize($username, $password_hash)
{
$pw_hash = get_account_login($username);
pretty_print($pw_hash);
if (!empty($pw_hash)) {
if ($password_hash == $pw_hash) {
$user = get_account_info($username);
pretty_print($user);
// $_SESSION['is_logged_in'] = true;
// $_SESSION['username'] = $username;
return true;
}
}
return false;
}
function pretty_print($input)
{
echo '
<pre>
' . print_r($input) . '
</pre>
';
}