I'm having a bit of trouble getting a session based registration form working, wondering if anyone could give me a hand... I found some code elsewhere on the forum which I thought would work but can't seem to get it to work for me.
session_start();
if (!isset($_SESSION['page'])){
$_SESSION['page']=1;
} else {
$_SESSION['page']++;
}
switch($_SESSION['page']) {
case 1:
echo 'page2';
break;
case 2:
echo 'page3';
break;
case 3:
echo 'page4';
default:
echo 'page1';
}
the basic idea is obviously to have a single page with multiple forms on it, I dont want to use '$_GET' or 'hidden fields' if I really dont have to. Any ideas?