Re: newbie question 2
| From: | Miles Thompson | Date: | Thu, 31 Jan 2002 17:59:59 +0000 |
| Subject: | Re: newbie question 2 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82966@lists.php.net to get a copy of this message | ||
Sessions are specific to the period when a specific browser is interacting with the site. When that browser is closed the session disappears. The values are stored on the server, and the session_id is used as a key to maintain state (or persistence of variables) between requests.
I don't know how they act in ASP. They are not site wide.
Check the documents to see if it is possible to access a count of the number of sessions. That would tell you how many connections you have. On the other hand there may be a server variable which will return that number, and you would avoid all that housekeeping.
Miles Thompson
At 06:54 PM 1/31/2002 +0100, Pafo wrote:
ok, i have reed the manual and i are having a hard time understanding it... i tryed some examples with sessions but neither one of them did work.... thats why i asked about sessions and cookies.... cause in asp u use sessions like this, Session("name") = "Steve" or Session("ANumber") = 12345 u dont have to declare them or anything... about the application, i dont know if u have been programming in asp..? in asp u have something called global.asa where u have your startcode with startcode i mean the code that exec when someone enters your site... in that global.asa u have something called application like this, Sub application_start() if application("number_of_peops_on_my_site") = <> then application("number_of_peops_on_my_site") = 1 else application("number_of_peops_on_my_site") = application("number_of_peops_on_my_site") + 1 end if end sub and then u have the opposit, the decreasing one... cause i cant think of an another way to keep track of the number of peops that are currently on my site... and since im not familiar with php i thought that it was something like the application to php to... how would u keep track of current number of peop on your site, and i dont mean a ordinary counter... cause in asp i would be able to do this: Number of peop on my site: <%= application("number_of_peops_on_my_site") %> regards pafo -- 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