Application Scope variables ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Marston

    #16
    Re: Application Scope variables ?

    To implement a hit counter in PHP I would use a database table.

    There is no such thing as being able to detect when the application is closed. The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser? That is impossible to tell.

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



    "aa" <aa@virgin.ne t> wrote in message news:415058ee$0 $42257$ed2e19e4 @ptn-nntp-reader04.plus.n et...
    Just to stream the discussion up - how a page hit conter in implemented in PHP?
    In ASP you increment a relative Application scope variable every time a page is requested. This veraible is accessible from any session.
    This variable is sitting in the memory as long as the Application (i.e. the website) is running.
    If the Application is stopped, it fires an event "application_on _close" and on this event you write an application data to a file from which it can be recovered when the application is restarted.

    How do I get the same effect in PHP?
    "aa" <aa@virgin.ne t> wrote in message news:414eb86a$0 $80627$ed2619ec @ptn-nntp-reader01.plus.n et...
    I am migrating to PHP from ASP where there are the Application Scope variables which are accessible from any page on a website and which are used, in particular, for hit counters.
    Is there a similar mechanism in PHP?

    Comment

    • Simon Stienen

      #17
      Re: Application Scope variables ?

      aa <> wrote:[color=blue]
      > Just to stream the discussion up - how a page hit conter in implemented in PHP?[/color]
      8< -- snip -- >8[color=blue]
      > How do I get the same effect in PHP?[/color]
      You have to save the new value in a file/database/... whenever you changed
      it, since there is no variable scope valid for more than the current
      session. At least not in standard PHP, maybe there is a non-standard
      extension for this.

      You might even have to check the synchronisation , for example using file
      locks to prevent two scripts from reading the same data file at the same
      time.

      If you use a database you should increment using
      "SET counter = counter + 1"
      instead of
      "SET counter = " . ($count + 1)

      --
      Simon Stienen <http://dangerouscat.ne t> <http://slashlife.de>
      »What you do in this world is a matter of no consequence,
      The question is, what can you make people believe that you have done.«
      -- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle

      Comment

      • Gordon Burditt

        #18
        Re: Application Scope variables ?

        >Just to stream the discussion up - how a page hit conter in implemented in PHP?

        I'd use a database:
        UPDATE hit_count set count=count+1, last=now() where url='...';
        or if I really wanted details for each hit, add an entry to a hit_log table,
        logging time, URL, and perhaps other stuff like IP, user name, session, referrer, etc.
        [color=blue]
        >In ASP you increment a relative Application scope variable every time a page is
        >requested. This veraible is accessible from any session.[/color]

        Besides hit counters, of what *USE* is such a variable?
        It can be accessed from (and messed up by) so many different
        concurrent sessions that any significant read/write use will have
        to worry about locking issues. Does ASP even guarantee that several
        sessions each doing the equivalent of $hitcount++; will be atomic
        and not lose counts (on a multiprocessor machine, possibly)?

        Assume $last_server is the ID of the last waitperson assigned to a table (and
        it's one of those "Applicatio n-scope" variables.
        IDs run from 1 to $max_server. You want to assign them in turn, round-robin.

        $last_server++;
        if ($last_server > $max_server) { $last_server = 1; }
        $this_server = $last_server;
        .... assign $this_server to serve the food for this order ...

        Now, how do you write that (or its equivalent in ASP) so it's
        multi-session, multi-processor safe? You don't assign the same
        server two orders a row. You don't skip anyone. Not even if a bunch
        of orders come in simultaneously.


        I also wouldn't be too pleased to learn that I'd lose several days
        worth of changes to that variable (kept only in memory) if the
        machine crashed. In particular, losing a variable like 'next invoice
        number to assign' kept in memory only would be a real nuisance.
        [color=blue]
        >This variable is sitting in the memory as long as the Application (i.e. the website) is
        >running.[/color]

        Which means you can lose it at any time if the Application is running.
        [color=blue]
        >If the Application is stopped, it fires an event "application_on _close" and on this
        >event you write an application data to a file from which it can be recovered when the
        >application is restarted.[/color]

        And if the application, or system, crashes? How often do you actually intentionally
        shut down a web server (besides applying security patches)? In my experience, this
        is MUCH less often than CPU fan failure or power supply failure.
        [color=blue]
        >How do I get the same effect in PHP?[/color]

        What do you need it for? I think it makes an unreliable hit counter and it's not
        good for much else.

        Gordon L. Burditt

        Comment

        • Tim Van Wassenhove

          #19
          Re: Application Scope variables ?

          In article <415058ee$0$422 57$ed2e19e4@ptn-nntp-reader04.plus.n et>, aa wrote:[color=blue]
          > Just to stream the discussion up - how a page hit conter in implemented =
          > in PHP?[/color]

          Imho there is a better solution for this. Use the logging
          functionalities of your webserver. And write a script, in the language
          of your choice to display those data.


          --
          Tim Van Wassenhove <http://www.timvw.info>

          Comment

          • Tim Van Wassenhove

            #20
            Re: Application Scope variables ?

            In article <414eb86a$0$806 27$ed2619ec@ptn-nntp-reader01.plus.n et>, aa wrote:[color=blue]
            > I am migrating to PHP from ASP where there are the Application Scope =
            > variables which are accessible from any page on a website and which are =
            > used, in particular, for hit counters.[/color]

            Store the data yourself in a file (serialize) /database/memory (shmop) and you have
            your own flexible shared variables.

            --
            Tim Van Wassenhove <http://www.timvw.info>

            Comment

            • Gordon Burditt

              #21
              Re: Application Scope variables ?

              >To implement a hit counter in PHP I would use a database table.

              Agreed.
              [color=blue]
              >There is no such thing as being able to detect when the application is closed. The
              >client simply stops sending requests to your web site. Is he still reading the last
              >page? Has he jumped to another site? Has he closed the browser? That is impossible to
              >tell.[/color]

              That's a SESSION, not the application. And no, you can't tell when
              it's closed except by timeout or occasionally by someone clicking
              on "LOG OUT".

              The APPLICATION being referred to is the web server itself. Shutting
              it down might be done with commands like "apachectl stop" or
              "shutdown", or tripping over the power cord. In my experience when
              the web server is shut down, it is shut down quite rudely by CPU
              fan failure, more than 50% of the time.

              Gordon L. Burditt

              Comment

              • aa

                #22
                Re: Application Scope variables ?

                "Does ASP even guarantee that several sessions each doing the equivalent of
                $hitcount++; "

                ASP' application is an object with a method "lock" to handle attempts to
                change a variable from two or more sessions at a time. I do not know is it
                guaranties something, but it works.
                So if there is nothing like that in PHP - thanks - you saved me time lokinmg
                for something which is not there.


                "Gordon Burditt" <gordonb.a6hin@ burditt.org> wrote in message
                news:cipte4$qal @library2.airne ws.net...[color=blue][color=green]
                > >Just to stream the discussion up - how a page hit conter in implemented[/color][/color]
                in PHP?[color=blue]
                >
                > I'd use a database:
                > UPDATE hit_count set count=count+1, last=now() where url='...';
                > or if I really wanted details for each hit, add an entry to a hit_log[/color]
                table,[color=blue]
                > logging time, URL, and perhaps other stuff like IP, user name, session,[/color]
                referrer, etc.[color=blue]
                >[color=green]
                > >In ASP you increment a relative Application scope variable every time a[/color][/color]
                page is[color=blue][color=green]
                > >requested. This veraible is accessible from any session.[/color]
                >
                > Besides hit counters, of what *USE* is such a variable?
                > It can be accessed from (and messed up by) so many different
                > concurrent sessions that any significant read/write use will have
                > to worry about locking issues. Does ASP even guarantee that several
                > sessions each doing the equivalent of $hitcount++; will be atomic
                > and not lose counts (on a multiprocessor machine, possibly)?
                >
                > Assume $last_server is the ID of the last waitperson assigned to a table[/color]
                (and[color=blue]
                > it's one of those "Applicatio n-scope" variables.
                > IDs run from 1 to $max_server. You want to assign them in turn,[/color]
                round-robin.[color=blue]
                >
                > $last_server++;
                > if ($last_server > $max_server) { $last_server = 1; }
                > $this_server = $last_server;
                > ... assign $this_server to serve the food for this order ...
                >
                > Now, how do you write that (or its equivalent in ASP) so it's
                > multi-session, multi-processor safe? You don't assign the same
                > server two orders a row. You don't skip anyone. Not even if a bunch
                > of orders come in simultaneously.
                >
                >
                > I also wouldn't be too pleased to learn that I'd lose several days
                > worth of changes to that variable (kept only in memory) if the
                > machine crashed. In particular, losing a variable like 'next invoice
                > number to assign' kept in memory only would be a real nuisance.
                >[color=green]
                > >This variable is sitting in the memory as long as the Application (i.e.[/color][/color]
                the website) is[color=blue][color=green]
                > >running.[/color]
                >
                > Which means you can lose it at any time if the Application is running.
                >[color=green]
                > >If the Application is stopped, it fires an event "application_on _close"[/color][/color]
                and on this[color=blue][color=green]
                > >event you write an application data to a file from which it can be[/color][/color]
                recovered when the[color=blue][color=green]
                > >application is restarted.[/color]
                >
                > And if the application, or system, crashes? How often do you actually[/color]
                intentionally[color=blue]
                > shut down a web server (besides applying security patches)? In my[/color]
                experience, this[color=blue]
                > is MUCH less often than CPU fan failure or power supply failure.
                >[color=green]
                > >How do I get the same effect in PHP?[/color]
                >
                > What do you need it for? I think it makes an unreliable hit counter and[/color]
                it's not[color=blue]
                > good for much else.
                >
                > Gordon L. Burditt[/color]


                Comment

                • aa

                  #23
                  Re: Application Scope variables ?

                  > Then do what other people have already suggested:

                  Actually I have suggested that myself, but hoped that there is more elegant
                  solution
                  Thanks.

                  "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                  news:cips55$sjm $1$8300dec7@new s.demon.co.uk.. .[color=blue]
                  >
                  > "aa" <aa@virgin.ne t> wrote in message
                  > news:415055cf$0 $42237$ed2e19e4 @ptn-nntp-reader04.plus.n et...[color=green]
                  > > Session will only make such a variable available within this session.
                  > > But I am talking about a variable available from any page from any[/color][/color]
                  session[color=blue]
                  >
                  > Then do what other people have already suggested:
                  > (a) Store those variables in a database.
                  > (b) Use a configuration which you can include() in every script.
                  >
                  > There are no application-level variables in PHP which persist across pages
                  > and sessions, so get used to it.
                  >
                  > --
                  > Tony Marston
                  >
                  > http://www.tonymarston.net
                  >
                  >
                  >[color=green]
                  > > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                  > > news:cip0pa$ig4 $1$8300dec7@new s.demon.co.uk.. .[color=darkred]
                  > >>
                  > >> "aa" <aa@virgin.ne t> wrote in message
                  > >> news:415002f7$0 $42212$ed2e19e4 @ptn-nntp-reader04.plus.n et...
                  > >> > Thanks.
                  > >> > You mean that PHP does not allow to store application-level variables
                  > >> > in
                  > >> > memory and every time I need to modify such a variable I have to[/color]
                  > > retrieve[color=darkred]
                  > >> > it
                  > >> > from disc (a file or DB) and then to write it back?
                  > >>
                  > >> If you want to store variables between one page and another the PHP way
                  > >> is
                  > >> sessions. All you need is session_start() at the beginning of each
                  > >> script.
                  > >> This will create an empty $_SESSION array the first time, then give you[/color]
                  > > back[color=darkred]
                  > >> everything you put in it.
                  > >>
                  > >> Note that you do not have to write the session data out to file[/color][/color][/color]
                  manually[color=blue][color=green]
                  > > as[color=darkred]
                  > >> PHP will do it automatically for you at the end of the script. It's all
                  > >> in
                  > >> the manual.
                  > >>
                  > >> --
                  > >> Tony Marston
                  > >>
                  > >> http://www.tonymarston.net
                  > >>
                  > >>
                  > >>
                  > >> > "Zurab Davitiani" <agt@mindless.c om> wrote in message
                  > >> > news:ALJ3d.2175 9$Lf5.2677@news svr27.news.prod igy.com...
                  > >> >> > your thinking is still too influenced by the rigid ASP structure.
                  > >> >> > Relax, open your mind and RTFM on sessions. :-)
                  > >> >>
                  > >> >> Session variables are not the same as application-level variables.[/color][/color][/color]
                  ASP[color=blue][color=green][color=darkred]
                  > >> >> offers an application framework, ASP *is* the framework.
                  > >> >>
                  > >> >> Having said that, you can replicate functionality via PHP by either[/color]
                  > > using[color=darkred]
                  > >> >> common files for variable storage/retrieval, or using a database.[/color][/color][/color]
                  Some[color=blue][color=green][color=darkred]
                  > >> > info
                  > >> >> should be easily locatable by searching.
                  > >> >
                  > >> >
                  > >>
                  > >>[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • aa

                    #24
                    Re: Application Scope variables ?

                    "There is no such thing as being able to detect when the application is closed.The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser?
                    That is impossible to tell."

                    That is not necessary to tell, for the actions of a particular visitor are not relevant.
                    As it happens with Windows/IIS/ASP, Application can either be closed manually, or it times out if there are not requests for a preset period of time. In other words, application closes when the last active session times out.
                    Is this the case with Apache server?
                    "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message news:cipsgh$npr $1$8302bc10@new s.demon.co.uk.. .
                    To implement a hit counter in PHP I would use a database table.

                    There is no such thing as being able to detect when the application is closed. The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser? That is impossible to tell.

                    --
                    Tony Marston

                    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



                    "aa" <aa@virgin.ne t> wrote in message news:415058ee$0 $42257$ed2e19e4 @ptn-nntp-reader04.plus.n et...
                    Just to stream the discussion up - how a page hit conter in implemented in PHP?
                    In ASP you increment a relative Application scope variable every time a page is requested. This veraible is accessible from any session.
                    This variable is sitting in the memory as long as the Application (i.e. the website) is running.
                    If the Application is stopped, it fires an event "application_on _close" and on this event you write an application data to a file from which it can be recovered when the application is restarted.

                    How do I get the same effect in PHP?
                    "aa" <aa@virgin.ne t> wrote in message news:414eb86a$0 $80627$ed2619ec @ptn-nntp-reader01.plus.n et...
                    I am migrating to PHP from ASP where there are the Application Scope variables which are accessible from any page on a website and which are used, in particular, for hit counters.
                    Is there a similar mechanism in PHP?

                    Comment

                    • Tony Marston

                      #25
                      Re: Application Scope variables ?

                      If by "applicatio n" you mean "web server" then it is not common practice to stop the web server when the last client has finished. A web server usually runs 24/7 so that it is available whenever somebody wants to access it. If you are talking about a closed application such as on a company's intranet which may only be available during certain times of day then shutting down the web server does nothing more than shut down the web server. There is no concept of running any closedown routines for whatever application may have been accessed during the time the web server was running. A web server like Apache is merely a vehicle for servicing HTTP requests. It serves up html documents or php documents or whatever. Those documents are the application. It has no knowledge of any particular application which it may run. Why should it?

                      --
                      Tony Marston

                      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



                      "aa" <aa@virgin.ne t> wrote in message news:41508cf8$0 $17960$ed2619ec @ptn-nntp-reader02.plus.n et...
                      "There is no such thing as being able to detect when the application is closed.The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser?
                      That is impossible to tell."

                      That is not necessary to tell, for the actions of a particular visitor are not relevant.
                      As it happens with Windows/IIS/ASP, Application can either be closed manually, or it times out if there are not requests for a preset period of time. In other words, application closes when the last active session times out.
                      Is this the case with Apache server?
                      "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message news:cipsgh$npr $1$8302bc10@new s.demon.co.uk.. .
                      To implement a hit counter in PHP I would use a database table.

                      There is no such thing as being able to detect when the application is closed. The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser? That is impossible to tell.

                      --
                      Tony Marston

                      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



                      "aa" <aa@virgin.ne t> wrote in message news:415058ee$0 $42257$ed2e19e4 @ptn-nntp-reader04.plus.n et...
                      Just to stream the discussion up - how a page hit conter in implemented in PHP?
                      In ASP you increment a relative Application scope variable every time a page is requested. This veraible is accessible from any session.
                      This variable is sitting in the memory as long as the Application (i.e. the website) is running.
                      If the Application is stopped, it fires an event "application_on _close" and on this event you write an application data to a file from which it can be recovered when the application is restarted.

                      How do I get the same effect in PHP?
                      "aa" <aa@virgin.ne t> wrote in message news:414eb86a$0 $80627$ed2619ec @ptn-nntp-reader01.plus.n et...
                      I am migrating to PHP from ASP where there are the Application Scope variables which are accessible from any page on a website and which are used, in particular, for hit counters.
                      Is there a similar mechanism in PHP?

                      Comment

                      • Zurab Davitiani

                        #26
                        Re: Application Scope variables ?

                        Lucas wrote:
                        [color=blue]
                        > sessions are stored as common files on the web server, one can
                        > configure it accordingly to his/her needs so that data(variables) are
                        > accesible from the required scope. Is there anything I missed?[/color]

                        Yes. Application level variables in this case means that the variables are
                        shared within the defined frame of an application. i.e. the variables are
                        shared between different sessions or clients accessing the "applicatio n."
                        For more information, look up Application and Session objects within the
                        ASP framework; or even Java servlets.

                        Comment

                        • Tony Marston

                          #27
                          Re: Application Scope variables ?


                          "Zurab Davitiani" <agt@mindless.c om> wrote in message
                          news:Nl44d.146$ JG2.143@newssvr 14.news.prodigy .com...[color=blue]
                          > Lucas wrote:
                          >[color=green]
                          >> sessions are stored as common files on the web server, one can
                          >> configure it accordingly to his/her needs so that data(variables) are
                          >> accesible from the required scope. Is there anything I missed?[/color]
                          >
                          > Yes. Application level variables in this case means that the variables are
                          > shared within the defined frame of an application. i.e. the variables are
                          > shared between different sessions or clients accessing the "applicatio n."
                          > For more information, look up Application and Session objects within the
                          > ASP framework; or even Java servlets.[/color]

                          This is a PHP group, so references to ASP and Java are out of place.

                          --
                          Tony Marston

                          This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




                          Comment

                          • Zurab Davitiani

                            #28
                            Re: Application Scope variables ?

                            Tony Marston wrote:
                            [color=blue]
                            > This is a PHP group, so references to ASP and Java are out of place.[/color]

                            They are relevant if you read the discussion thread as they pertain to the
                            discussion on how to replicate similar functionality in PHP.

                            Comment

                            • aa

                              #29
                              Re: Application Scope variables ?

                              You missed me, Tony. Of course I did not mean application==we bserver
                              "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message news:ciqd4r$o7m $1$830fa7a5@new s.demon.co.uk.. .
                              If by "applicatio n" you mean "web server" then it is not common practice to stop the web server when the last client has finished. A web server usually runs 24/7 so that it is available whenever somebody wants to access it. If you are talking about a closed application such as on a company's intranet which may only be available during certain times of day then shutting down the web server does nothing more than shut down the web server. There is no concept of running any closedown routines for whatever application may have been accessed during the time the web server was running. A web server like Apache is merely a vehicle for servicing HTTP requests. It serves up html documents or php documents or whatever. Those documents are the application. It has no knowledge of any particular application which it may run. Why should it?

                              --
                              Tony Marston

                              This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



                              "aa" <aa@virgin.ne t> wrote in message news:41508cf8$0 $17960$ed2619ec @ptn-nntp-reader02.plus.n et...
                              "There is no such thing as being able to detect when the application is closed.The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser?
                              That is impossible to tell."

                              That is not necessary to tell, for the actions of a particular visitor are not relevant.
                              As it happens with Windows/IIS/ASP, Application can either be closed manually, or it times out if there are not requests for a preset period of time. In other words, application closes when the last active session times out.
                              Is this the case with Apache server?
                              "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message news:cipsgh$npr $1$8302bc10@new s.demon.co.uk.. .
                              To implement a hit counter in PHP I would use a database table.

                              There is no such thing as being able to detect when the application is closed. The client simply stops sending requests to your web site. Is he still reading the last page? Has he jumped to another site? Has he closed the browser? That is impossible to tell.

                              --
                              Tony Marston

                              This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



                              "aa" <aa@virgin.ne t> wrote in message news:415058ee$0 $42257$ed2e19e4 @ptn-nntp-reader04.plus.n et...
                              Just to stream the discussion up - how a page hit conter in implemented in PHP?
                              In ASP you increment a relative Application scope variable every time a page is requested. This veraible is accessible from any session.
                              This variable is sitting in the memory as long as the Application (i.e. the website) is running.
                              If the Application is stopped, it fires an event "application_on _close" and on this event you write an application data to a file from which it can be recovered when the application is restarted.

                              How do I get the same effect in PHP?
                              "aa" <aa@virgin.ne t> wrote in message news:414eb86a$0 $80627$ed2619ec @ptn-nntp-reader01.plus.n et...
                              I am migrating to PHP from ASP where there are the Application Scope variables which are accessible from any page on a website and which are used, in particular, for hit counters.
                              Is there a similar mechanism in PHP?

                              Comment

                              • Lucas

                                #30
                                Re: Application Scope variables ?

                                Hi aa,

                                "aa" <aa@virgin.ne t> wrote in message news:<415055cf$ 0$42237$ed2e19e 4@ptn-nntp-reader04.plus.n et>...[color=blue]
                                > Session will only make such a variable available within this session.
                                > But I am talking about a variable available from any page from any session[/color]

                                using real sessions(!=cook ie emulation) makes it possible to access
                                data from any client application, independent of the one that created
                                it. However, I did read some stuff on ALV, and admit it's much more
                                sophisticated, does anyone know if there are any improvements in PHP5?
                                [color=blue]
                                >
                                > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                                > news:cip0pa$ig4 $1$8300dec7@new s.demon.co.uk.. .[color=green]
                                > >
                                > > "aa" <aa@virgin.ne t> wrote in message
                                > > news:415002f7$0 $42212$ed2e19e4 @ptn-nntp-reader04.plus.n et...[color=darkred]
                                > > > Thanks.
                                > > > You mean that PHP does not allow to store application-level variables in
                                > > > memory and every time I need to modify such a variable I have to[/color][/color]
                                > retrieve[color=green][color=darkred]
                                > > > it
                                > > > from disc (a file or DB) and then to write it back?[/color]
                                > >
                                > > If you want to store variables between one page and another the PHP way is
                                > > sessions. All you need is session_start() at the beginning of each script.
                                > > This will create an empty $_SESSION array the first time, then give you[/color]
                                > back[color=green]
                                > > everything you put in it.
                                > >
                                > > Note that you do not have to write the session data out to file manually[/color]
                                > as[color=green]
                                > > PHP will do it automatically for you at the end of the script. It's all in
                                > > the manual.
                                > >
                                > > --
                                > > Tony Marston
                                > >
                                > > http://www.tonymarston.net
                                > >
                                > >
                                > >[color=darkred]
                                > > > "Zurab Davitiani" <agt@mindless.c om> wrote in message
                                > > > news:ALJ3d.2175 9$Lf5.2677@news svr27.news.prod igy.com...
                                > > >> > your thinking is still too influenced by the rigid ASP structure.
                                > > >> > Relax, open your mind and RTFM on sessions. :-)
                                > > >>
                                > > >> Session variables are not the same as application-level variables. ASP
                                > > >> offers an application framework, ASP *is* the framework.
                                > > >>
                                > > >> Having said that, you can replicate functionality via PHP by either[/color][/color]
                                > using[color=green][color=darkred]
                                > > >> common files for variable storage/retrieval, or using a database. Some[/color][/color]
                                > info[color=green][color=darkred]
                                > > >> should be easily locatable by searching.
                                > > >
                                > > >[/color]
                                > >
                                > >[/color][/color]

                                Comment

                                Working...