Hi

Hmm, well the parts I see as being relevant, although I do not fully understand, are as follows:

session_start();
$session = session_id
();

if(!isset(
$_COOKIE['Cookie'
])) {
# no COOKIEs exist so create new one
#
setcookie("Cookie", $session, time() + ((3600 * 24) * $cfg['COOKIE_DURATION'
]));
}
else {
# found COOKIEs so update
#
$session = $_COOKIE["Cookie"
];
setcookie("Cookie", $session, time() + ((3600 * 24) * $cfg['COOKIE_DURATION'
]));
}

# check for framework SESSIONs
#
if(!isset($_SESSION
)) {
# no SESSIONs exist so create new one
#
$_SESSION['Session']['UserId'
];
$_SESSION['Session']['UserAccess'
];

$_SESSION['Session']['Username'
];
$_SESSION['Session']['Password'
];

$_SESSION['Session']['MenuState'
];
$_SESSION['Session']['MenuCommand'
];
}


1. I understand I need to implement sessions, fine.
2. I am not sure if I will need cookies and, therefore, appropriate expiration time-out values?
3. I am not sure what session variables I will need.. any ideas (username/password etc)?
4. I'm not sure where this code should go in my structure (detailed below).
5. However, the first thing I want to do is simply display the form again after submission so the user can correct any errors.
I can then try and implement an error-count array and utilise that to display the errors in red at the top of the form (somehow), for example.

Could you advise me how to ammend my structure (below) to accommodate point 5?

Once that is done, then I can move on to the rest.. bitesize. [img]images/smilies/biggrin.gif[/img]

Current structure is as follows:
PHP Code:
<?php if (isset($_POST['submit'])) { // a new member joins using the form below
// Form validation
else { 
// If validation is all TRUE, then enter a record into DB
}
} else { 
// Drop-down box queries
?>
// Start FORM
...
// End FORM
<?php
// end if main if else statement for if the form has been submitted
?>
Thanks.

Mak [img]images/smilies/smile.gif[/img]