> I need a class that can quickly help me set cookies and sessions, and
check
> up against them
>
> anyone have an idea where i can get one like this?

If you can't find one in any of the umpteen PHP code archives linked from
http://php.net/links.php, here's one I wrote for you:

----- session.inc -----
<?php
    if (isset($session_id)){
        # Look up $session_id in your database for their data
    }
    else{
        session_start();
        $session_id = PHP_SESSID; # I probably the PHP_SESSID bit wrong...
        set_cookie('session_id', $session_id, time() + 2*365*24*60*60, '/');
        # Insert default values with $session_id into your database.
    }
?>

Simply require 'session.inc' at the tip-top of every page that needs session
data.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to