AJAXBot/www/conn_generic.php

14 lines
454 B
PHP
Raw Normal View History

2014-06-16 21:25:59 +00:00
<?php
mysql_connect("HOSTADDRESS", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE_NAME");
session_start();
2014-07-09 22:00:12 +00:00
$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;
}
2014-06-16 21:25:59 +00:00
?>