For example:
<?php
//start session to hold variables for final script
session_start();
//create session variable for form number to be viewed
$_SESSION['form_num'];
//if first time user entered registration page
if(empty($_SESSION['form_num']))
{
//include first form table
include("register_table.php");
//set from number to 2
$_SESSION['form_num'] = 2;
}
else if ($_SESSION['form_num'] == 2)
{
//include second form table
include("register_table_2.php");
//if user is band/artist
//set form number to 3 for music information
//if user is visitor
//set form number to 4 for agreement of terms
}
else if ($_SESSION['form_num'] == 3)
{
//include third form table
include("register_table_3.php");
//set form number to 4
$_SESSION['form_num'] = 4;
}
else if ($_SESSION['form_num'] == 4)
{
//include fourth form table
}
//End session variables
//for registration
//Here
?>
is this the wrong way to do this? I am having a hard time figuring out how to make the user go back if they click the back button on say form 2,3,4..... Do i need to use something other than a session variable?
This post has been edited by laytonsdad: 09 November 2011 - 11:19 AM

New Topic/Question
Reply



MultiQuote





|