You can shorten the receiving document code by doing it this way:
Sending Document--
<?PHP session_start(); ?>
<a href="https://secure.domain.com/?<?PHP echo session_name(), '=', session_id(); ?>">hyperlink</a>
Receiving Document--
<?PHP session_start(); ?>
The above approach is necessary when the domain names/URL for the secure and non-secure are indeed different.
If one is talking about going from the main domain to it's sub-domain name (or vice-versa) on the same server, then it's possible for the session to still be saved without putting the session info in the URL. Example - going from a non-secure page like this:
http://www.example.com/cart.php
over to a secure page like this:
https://www.secure.example.com/checkout.php
This should work by setting 'session.cookie_domain' using session_set_cookie_params() or init_set() functions (before session_start). Set the domain argument to '.example.com' in this scenario. Notice there's a dot at the beginning of the domain name. That should allow the session to be recognized on the secure and non-secure page(s).
You could save the regular cookies information in the session that is being passed to the secure page, and then recreate the regular cookie once you get to the secure page.
FYI: The setcookie()'s last argument specifies whether you're only allowed to read the cookie value on a secure page (the default is false/off; you can read a cookie from secure and non-secure pages).
If you have the same main domain and sub-domain scenario as above, You should be able to access cookie values from the secure page too. One would specify the fifth argument in setcookie(), which is the domain part. When creating the regular cookie specify it something like this:
setcookie('cart_id', $cart_id, time() + 14400, '/', '.example.com');
Notice that there's a dot before the domain name. This will allow the cookie to be retrieved from both the www.example.com and from secure.example.com where one would have the secure page.
Without specifying the domain argument, the default domain is used and a cookie with domain "www.example.com/" is created. On the secure page, the browser doesn't send the cookie values to the server because "secure.example.com/" doesn't match "www.example.com/". As far as the browser is concerned, it thinks it's a completely different domain/site.
hth.