What are the best practices for passing SID in Flash navigation bars within framesets in PHP?

When passing SID (Session ID) in Flash navigation bars within framesets in PHP, it is important to ensure that the SID is properly propagated across frames to maintain session continuity. One best practice is to include the SID in the URL parameters of the Flash navigation links to ensure that the session is maintained as users navigate through the site.

<?php
// Start the session
session_start();

// Get the current session ID
$sid = session_id();

// Output Flash navigation link with SID
echo '<a href="flash_navigation.swf?SID=' . $sid . '">Link</a>';
?>