I'm creating a very simple PHP (Version 5.3.15) prototype for usability testing. I'm using sessions to pass along data to make the prototype more realistic. (In other words, security and rigor aren't important.) Right now I'm developing this on my localhost, a Mac.
On each page I include a very simple PHP file called "sessionheader.php". This is called before the HTML tag, etc.:
<?php session_start(); ?>
Page 1:
<?php
include( 'sessionheader.php' );
?>
<!DOCTYPE html>
<html lang="en">
<head>...</head>
<body>
...
<?php
$_SESSION['step'] = "foo";
echo $_SESSION['step'];
?>
...
</body>
</html>
The session variables are not playing back. A couple more details:
- my PHPSESSID cookie is getting set.
- I have a destroyer page in my prototype that I use to reset things:
-
<?php
session_start();
session_destroy();
header('Location: index.php');
?>
Any help would be appreciated. Please LMK if I can provide more details.