how do I turn hidden Login form values into session variables?
QUESTION: How do I get the hidden form elements for nationality, country, studylang, primelang from the Login form's Post array to become session variables?
Adobe's page at http://kb2.adobe.com/cps/165/tn_16563.html gave me info that didn't work since the code was old. The first question I asked received a useful, but partial answer and none of the values are appearing. The whole thing is laid out below and I don't know if I can make it shorter and still make sense of it.
Page 1 has a login form with six fields.
The textfields in the form are username and password.
The hidden fields in the form are: nationality, country, studylang, primelang and their values will be set by incoming URL paramenters from a prior page or hard coded in.
I am trying to create session variables of the four hidden fields to avoid having to deploy recordsets on every subsequent page.
After the Login button is pushed, I want these four hidden form fields, nationality, country, studylang and primelang, and their values, to pass, as Session Variables, to the next page and to subsequently be available to all pages so I can use them in links to other pages and in <img src="folderX/SessionVariableValue/book1.php. > Make sense?
Every supporting page seems to work:
On the login page, the $MM_redirectLoginSuccess = "yadayada.php"; works fine.
I've used <?php if ($_POST) {print_r($_POST);} ?> to check the post array and it is working correctly for all the fields.
I have created the bindings for the four Session Variables with the same words: nationality, country, studylang, primelang and deployed them into the recipient page:
<?php echo $_SESSION['primelang']; ?>
<?php echo $_SESSION['country']; ?>
<?php echo $_SESSION['nationality']; ?>
<?php echo $_SESSION['studylang']; ?>
QUESTION: How do I get the form elements for nationality, country, studylang, primelang from the Post array to input into the head code on the recipient page? I have this deployed in the head code, but the gentleman who offered to help previously didn't inform me how to get the hidden field values into the 'whatever'.
<?php session_start();
$_SESSION['nationality'] = 'whatever';
$_SESSION['studylang'] = 'whatever';
$_SESSION['primelang'] = 'whatever';
$_SESSION['country'] = 'whatever';
$nationality = $HTTP_POST_VARS['nationality'];
$studylang = $HTTP_POST_VARS['studylang'];
$primelang = $HTTP_POST_VARS['primelang'];
$country = $HTTP_POST_VARS['country'];
?>
What is the magic, missing link?
I tried using Form Variables to pick up the values, but PHP didn't like it or I messed it up. I cannot find one COMPLETE explanation of how to create, pass, retrieve and deploy Session Variables anywhere on the web. Thank you for your help.
