you can do one of these two things:
1) create the frameset using PHP:
print "<frame src=\"abc.php?sess_id=$SID\">";
...
2) in your frameset file, treat it as a template and have a PHP read the file, insert the IDs and print out the frameset:
frameset.html:
<frame src="frame.php?SID=####sid####">
showframes.php:
<?php
$fd = fopen("frameset.html");
$contents = fread($fd, filesize("frameset.html"));
fclose($fd);
str_replace("####sid####", $session_id, $contents);
echo $contents;
?>
I'm pretty sure others have their own ways!
-sridhar