I have a script that creates server session variables.
I need to insert 2 of these variables into a simple form (on a php page) using hidden form fields.
<?php
session_start();
?><pre><?php
print_r($_SESSION);
?>
I created a simple php page with the code above. I can see the session variables easily on the page, as you can see in this part of the code I copied from the page:
[login] => andrew8855
[pass] => $P$BIsPUTQ/e4mJSlaDsRLA48mB20xxIC1
[email] => andrew@mysiteaddress.com
[name_f] => Andrew
[name_l] =>
[street] =>
[street2] =>
[city] =>
In the custom form, I need to get/print the variables from above into the form as so:
<input type="hidden" name="login_email" id="login_email" value="[email]" />
<input type="hidden" name="login_user" id="login_user" value="[login]" />
So when the form is submitted, the variables that exist in the session will be submitted in the hidden form fields.
After searching for hours, I found that I might be able to do this somehow with session_start();....but I'm not clear about how to accomplish this. Thank you for any suggestions.