Page 1 of 1

Tell if refreshing?

Posted: Thu Jul 07, 2005 5:17 pm
by cbrian
Is there a way to tell if someone refreshed the current page?

Posted: Thu Jul 07, 2005 5:30 pm
by hawleyjr

Code: Select all

//untested
session_start();

if(!isset($_SESSION['pg_cnt'])){

$_SESSION['some_page_id'] = TRUE;

}else{ 

 echo 'Page Hit';

}
/*on any other page you would have to make $_SESSION['some_page_id'] = false
*/

Posted: Thu Jul 07, 2005 6:25 pm
by cbrian
Well, this is a game, where you're really on the same page the whole time, in a battle...so I don't think that would really work.

Posted: Thu Jul 07, 2005 9:59 pm
by hawleyjr
Why not?