You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2018. It is now read-only.
function session_auth($username, $password, &$db = NULL)
{
global $db_server;
global $db_user;
global $db_password;
global $db_database;
$db_null = ($db == NULL);
if($db_null)
$db = new mysqli($db_server, $db_user, $db_password, $db_database) or die('<div class="failure">ERROR: Database connection failed</div>');
$result = $db->query('SELECT uid, username FROM user WHERE username="'.htmlspecialchars($db->real_escape_string($username), ENT_HTML5).'" AND password="'.md5($password).'"');