i code a form with four steps in PHP. I submit each step with POST method.
My steps looks like the first:
if(trim($_GET['p']) == 1){
$_SESSION['rate_step'] = $_GET['p'];
$_SESSION['data_change'] = @$_POST['change'];
if(@$_POST['change'] != ''){
$_SESSION['rate_disabled'] = '';
}
if(@$_POST['new_rate'] != ''){
$_SESSION['rate_disabled'] = '';
if($_SESSION['rate_lastinsertid'] != ''){
$_SESSION['rate_lastinsertid'] = '';
};
}
$extra_vis = 'display:none';
$content = show_template('agent_rates_s1', array(
'step' => $_SESSION['rate_step'],
'monat' => $monat,
'jahr' => $jahr,
'jahr_zukunft' => $jahrfut,
'zielland' => $zielland,
'herkunfstland' => $herkunfstland,
'service' => $_SESSION['rate_service'],
'month_service' => $_SESSION['rate_month'],
'year_service' => $_SESSION['rate_year'],
'origin_country' => $_SESSION['rate_origin_country'],
'destination_country' => $_SESSION['rate_destination_country'],
'city' => $_SESSION['rate_city'],
'street' => $_SESSION['rate_street'],
'postcode' => $_SESSION['rate_postcode'],
'floor' => $_SESSION['rate_floor'],
'disabled' => $_SESSION['rate_disabled'],
'extra_vis' => $extra_vis,
));
}
When I click on another menu item in the navigation and get than back to my form or the first step fields are empty. Every Session is empty. Why ?
Is the problem that I use $_GET['p'] == 1 and so on?