[PHP sessions - passing secure vars] -
PHP sessions - passing secure vars
Discuss PHP sessions - passing secure vars
Posted by: Larry
Hello,
Does anyone know if you can pass PHP session variables from a non-secure page (http) to a secure page (https)?
I have session variables in public pages, then user will go to secure pages, but PHP is creating new session vars.
Anyone know how to keep the session active?
thanks
Posted by: Larry
Can these 2 functions be used to pass sessions from one domain to another?
thanks
Posted by: shan
[QUOTE][i]Originally posted by Larry [/i]
[B]Hello,
Does anyone know if you can pass PHP session variables from a non-secure page (http) to a secure page (https)?
I have session variables in public pages, then user will go to secure pages, but PHP is creating new session vars.
Anyone know how to keep the session active?
thanks [/B][/QUOTE]
I think that if you have the page that it's linked to in FORM tags you might be able to pass it like that.
Something like this maybe??
[PHP]
<?php
echo "<FORM ACTION='newpage.php' METHOD='GET'>";
echo "<input type='hidden' value='$sessionid' name='sessionid'>";
echo "<input type='submit' value='go there'>";
echo "</form";
?>
[/PHP]
$sessionid would be what you call your session id as, and name would be the name that you're calling it as on the page that it goes to. You could also use javascript and make it a hyperlink or however you wanted to do it :D
You can also use the GET or POST vars in the method, howevery you choose...
Good luck!