Passing the session_id from non-secured to SSL page
Posted: Thu Dec 16, 2004 9:03 am
I am trying to continue a session from a non-secured page to a SSL shared certificate page. The session remains running on the previous pages, but when the pages are accessed through the SSL certificate (on the same server), the session has to be started all over and re-filled with the info. I am trying to pass a shopping cart with multiple items, and it could be very innefective to try POSTing the data.
Here's what I tried (and failed):
Page1:
Page2:
If I use these codes, it doesn't give me any errors, but the info is not there
Here's what I tried (and failed):
Page1:
Code: Select all
<?php
<input type="hidden" name="session" value="<? echo session_id(); ?>">
?>Code: Select all
<?php
session_start();
session_id($_POST['session']);
?>