Results 1 to 3 of 3

Thread: DB Sessions

  1. #1
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DB Sessions

    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!

  2. #2
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh, come on guys! Anyone??

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Sorry, I don't think anyone here has experience with PostgreSQL, less that particular package.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •