Thanks a lot and sorry for bothering.. I'm still a PHP rookie, I am having a few problems trying to understanding/finding out how to keep multi session live together works.. here my existing sessions e.g.
session_start();
// If no session exists, create one
if (!session_is_registered('lesson')) {
$_SESSION['lesson'] = new lesson;
}
$lesson = $_SESSION['lesson'];
and then i want to add new session from code at below:
if (!isset($_POST['languageselect'])) {
$languageselect = $standardlanguage;
} else { /* set standard language */
$languageselect = $_POST['languageselect'];
} //endif
if($languageselect == 1) { /* My Language Pack */
$languagearray = array (
1=>"one",
2=>"two");
} else { /* English Language Pack (=standard) */
$languagearray = array (
1=>"one",
2=>"two");
function printoptionbox($boxname, $cssclass, $elementsarray, $kataktiv=1) {
echo "<select name='$boxname' class='$cssclass'>";
while (list($key,$value) = each($elementsarray)) {
if ($key == $kataktiv) {
$SELECTED = "SELECTED";
} else {
$SELECTED = "";
} //endif
echo "<option $SELECTED value='$key'>$value</option>";
} //endwhile
echo "</select>";
}
Here the HTML code from dropdown language options:
<td class="arial" width="210"><?php printoptionbox("languageselect", "languageselect", $language_array, $kataktiv=$languageselect); ?></td> <input type="submit" name="languageselectsubmit" value="OK" width="30" style= "width: 30px; font-size:10px" class="submitbutton">
but i most confuse, how to create the session from language code above and then would be work for another page (different code), because the multiple language options just work in first page but will resetting for next page... Thank you so much for any advice on this