Re: sessions without cookies?

From: Date: Fri, 26 Jan 2001 23:06:12 +0000
Subject: Re: sessions without cookies?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36913@lists.php.net to get a copy of this message
if yours only storeing one or two variables in a db, dont mind writing either functions to store all this in the db, or having 5-10 lines of code per page to this then fine. But sessions are so simple... <? session_start(); $test[] = '123'; $test[] = '456'; $test[] = '789' $someclass = new product_class(); $SessionID = time(); session_register('test'); session_register('someclass'); session_register('SessionID'); ?> three lines of code, I can store text, arrays, class's all in three lines of code, four if you count session_start(). now one those vars have been registered you no longer have to execute session_register() everytime you change something, its all automatic. I use sessions because they are so simple. I cant say for sure but a good guess would be that file I/O from sessions would be less overhead then mysql_db overhead. -- Chris Lee Mediawaveonline.com lee@mediawaveonline.com "Noel Akins" <nakins@arkansas.net> wrote in message news:5.0.2.1.0.20010125190927.00ab4a70@mail.arkansas.net... > Would there be any point in using php sessions if you aren't using cookies? > You have to store login info anyway, why not just use a temp table to store > transaction info and write to the database at the end of a session? From > what I've read on sessions, you have to use cookies > thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#36913) next »