bob ross
i hate my life
This commit is contained in:
parent
0a0ef6b725
commit
9ded733d97
1 changed files with 9 additions and 0 deletions
|
@ -2,4 +2,13 @@
|
||||||
mysql_connect("HOSTADDRESS", "USERNAME", "PASSWORD");
|
mysql_connect("HOSTADDRESS", "USERNAME", "PASSWORD");
|
||||||
mysql_select_db("DATABASE_NAME");
|
mysql_select_db("DATABASE_NAME");
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
$config = mysql_fetch_object(mysql_query("SELECT * FROM `config` WHERE `id`=1"));
|
||||||
|
|
||||||
|
function checkIfLoggedIn() {
|
||||||
|
if(mysql_num_rows(mysql_query("SELECT * FROM `admin` WHERE `username`='". mysql_real_escape_string($_SESSION['user']) ."' AND `password`='". $_SESSION['pwd'] ."'")) > 0)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in a new issue