You are here: Re: How to figure out if a page has already been loaded « All PHP « IT news, forums, messages
Re: How to figure out if a page has already been loaded

Posted by J.O. Aho on 10/04/62 11:32

Stefan Mueller wrote:
>> You could ID each page with an ID number and store the ID number in your
>> session, if the ID number from the session is the same as the pages, then
>> don't generate a new number.
>
> Yea, of course, I can store my random numbers within $_SESSION["..."]. I
> didn't realize that $_SESSION["..."] is a session variable. I was only
> focused on $_SESSION["count_session"].
>
> Many thanks
> Stefan
>
>>> PS: I don't like to use cookies
>> Session is a cookie.
>
> Does that mean that if a user disables cookies on this browser my page won't
> work?
> What will happen? Error message?

If cookies are disabled, it's will each time a page loaded result in that
isset($_SESSION["count_session"]) will be false, and your script will try to
set a new session but it will be ignored by the browser.

You should include a cookie check in your page (this could be done with
javascript and result in an alert if it notice that there hasn't been a cookie
set and tell the user that the site needs cookies to work properly, of course
the user could have disabled the javascript too and this case you can use a
reference check, if it notice that the reference is to your pages and it don't
find a cookie it could generate an error message to the page where telling
about cookies, but references can be turned off too).


//Aho

 

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

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