See anything wrong with this code?
Code:
<?php
session_start();
$rand = (isset($_SESSION['rand']) ? intval($_SESSION['rand']) : 0);
if( $rand < 1 || $page < 2 ){
$rand = mt_rand(100000, 999999);
$_SESSION['rand'] = $rand;
}
session_write_close();
$side_a = "includes/side-a.php";
$content = "includes/content.php";
include("template.php");
?>
content.php contains the pagination code. I added:
echo "rand = ". $_SESSION['rand'];
and each page has a different $rand value so it's not being saved... is there something wrong with the way I include files? I didn't find any blank lines in the files or output.