i hate my life
This commit is contained in:
MallocNull 2014-07-09 17:00:12 -05:00
parent 0a0ef6b725
commit 9ded733d97

View file

@ -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;
}
?> ?>