Hi to all,
I downloaded the pgsql_session_handler package to easier store session data into a db! Now, I can't get it work! Here's the functions I have to log in and out:
PHP Code:
function login()
{
$user = $_POST[user];
$pass = $_POST[pass];
$pass = mysql_escape_string($pass);
$sql = "select * from users where username = '$user' && password = '$pass'";
$res = $this->db->doquery($sql);
$num = $this->db->get_num($res);
if($num == 1)
{
$this->in = true;
$this->storeVars($user, $pass);
$this->see_if_online();
}
else
{
if($this->type != "forum")
{
$this->redirect();
}
else
{
$this->logout();
$this->in = false;
}
}
}
function logout()
{
$this->session->del("user");
$this->session->del("pass");
$this->session->del("hash");
$this->in = false;
}
Notes: this functions is in a class named auth, session is an object of another class named session, db is an object of another class named database
Also, I'm stuck on how to make the .htaccess file required by this package to run!
Well, I can't see how to implement this package into my project! Any help would be appreciated!
Thanks in advace!
Bookmarks