noel,
i assume that what you want is that SID should be available in all the pages which are browsed(needless to say session support should be done in all the pages in question)
there are two ways of doing this
1. pass the session id alongwith url explicitly like
www.yourpage.com/nextpage.php?id=$SID or like the way mentioned by you.
Better and less painful way!
2.You can also ensure that it is automatically appended by compiling PHP with -enable-trans-id(alongwith other options).
In doing so, you will not have to include the <?=SID?> within the URL, as it will be automatically placed there.
after this you should be able to see this option enabled under "configure command" heading of 'phpinfo()'.
hope this solves your problem.Cheers!