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/13/38 11:32

Stefan Mueller wrote:

> But where do I have to store my already created random numbers so I can use
> them the next time the PHP page gets loaded.

There are many options, database, file, cookie...
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.

$pageid=22;
if (!isset($_SESSION["count_session"])) {
$_SESSION["count_session"] = 1;
}
else if($_SESSION["ID"] != $pageid) {
$_SESSION["count_session"]++;
}
$_SESSIOM["ID"] = $pageid;


> PS: I don't like to use cookies

Session is a cookie.

 

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

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