Forum Moderators: coopster
<?php
require('sess.inc.php');
if (isset($_POST['scheck'])) {
$activitiesarray=Array();
foreach ($_POST as $key => $val) {
$activitiesarray[$key] = $val;
}
$_SESSION['activityform'] = $activitiesarray;
}
elseif (isset($_POST['from1check'])) {
$form1array=Array();
foreach ($_POST as $key => $val) {
$form1array[$key] = $val;}
$_SESSION['form1']= $form1array;
}
?>
<?php
require_once 'db.inc.php';
if(!isset($_SESSION['form1'])){
include 'form1.php';
}
elseif(!isset($_SESSION['activityform'])){
include 'schedule.inc.php';
}else{
print_r($_SESSION);
}
?>
if it is set then don't include form1 but rather include schedule.inc.php
I thought aboult doing away with the sessions totaly and jjust passing all the data from each form with hidden inputs but that just seems like a lot of work and a good place for errors to wait. Although now I'm thinking it may have been faster to do it that way.