Reply to Re: keeping variables between webbrowsers requests

Your name:

Reply:


Posted by eliran on 09/06/07 08:34

On Sep 5, 11:16 pm, Ian Hobson <ian.hob...@ntlworld.com> wrote:
> eliran wrote:
> > I am new user in PHP
>
> > is there in PHP a mechanizm to keep vaiables (or arrays)
> > so on each new client request
> > I can see previous values I kept in previous client request ?
>
> > something like internal 'database' ?
>
> > rgrds
> > EL
>
> Yes - they are called session variables. See CXLIX. Session Handling
> Functions in the manual :)
>
> You have to start the session (e.g. by calling session_start();) which
> creates the super global $_SESSION and populates it with the variables
> your saved there from last visit by this browser.
>
> Note - the session is controlled by a cookie, so it refers to the
> browser invocation, not a window.
>
> If you want something stored that is unique to a window, it - or an
> identifier so you can get it back - has to go into a hidden field in the
> form.
>
> Warning - You should (IMHO) turn off the option in php.ini that permits
> sessions to be controlled by the URL, because it is too easy for
> sessions to be hi-jacked when the URL is bookmarked or copied. This will
> mean that the session mechanism will only work if your visitors haven't
> turned off cookies completely.
>
> Regards
>
> Ian

Ian,

1.
the SESSION global may help.
to handle the client session ID + it's variables.

I mean something just for server variables handling, no connection to
clients
so is it possible to handle server only global variables
like to save last used tcp port or calculate some total entries
and of course much more.

rgrds
EL

[Back to original 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

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