Here's the page1.php (after a user submitted a form)
Code: Select all
<?PHP
session_start();
header("Cache-control: private");
if(isset($_POST["submit"] )) {
// connect stuff here, etc.
// other non-important code here
$refnumber= // date function to generate *unique* reference number;
$_SESSION['milkdudsrule'] = $refnumber;
header( "Location: http://www.sinbadisgettingold.com/page2.php" );
}
?>Code: Select all
<?PHP
session_start();
header("Cache-control: private");
?>
some zippy html here. Your reference number is:
<?PHP
if ( isset( $_SESSION['milkdudsrule'] ) ) {
echo "$refnumber";
}
else {
echo "could not start session";
}
?>I've also tried removing the header() on page1.php, and applying the
Code: Select all
if ( isset( $_SESSION['milkdudsrule'] ) ) {
echo "$refnumber";
}
else {
echo "could not start session";
}i just can't seem to get the variable to pass on to page 2. Thanks in advance. Mondays are fun.