You are here: Re: Session Cookie Problems « PHP Programming Language « IT news, forums, messages
Re: Session Cookie Problems

Posted by Oli Filth on 10/13/94 11:36

StevePBurgess@gmail.com said the following on 04/01/2006 15:00:
> session_start();
> session_register('sname','slevel','semail','stime','sadminlevel');
> $sname = *real name of user*
> $slevel = *their membership level*
> $semail = *their email address*
> $sadminlevel = *there administration level*
> $stime = *the time they logged in*

First of all, don't do that. Since PHP 4.2, use of session_register() is
not recommended. Use $_SESSION["whatever"] instead. See
http://php.net/session_register.


> Is there a way of
>
> 1) recognising that cookies are disabled
> 2) if they are, implementing a different way of maintaining sessions?

Yes, you can use a GET variable in all the URLs. PHP can do this
automatically - see
http://www.php.net/manual/en/ref.session.php#session.idpassing.

However, passing session IDs this way has a lot of issues associated
with it (security, bookmarking, search-engine problems, etc.).

IMHO, I would use only cookies. If a user has cookies disabled
irrationaly (IMO, again), they should just have to live with sites not
working correctly. HTTP is a statless protocol, and complex modern sites
usually require state information to provide useful functionality, and
cookies are the best mechanism to provide that information.

<insert flame here>


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация