On your frame building html page name your frames, i.e.
<frameset ....>
<frame name="frame1" ....>
<frame name="frame2" ....>
</frameset>
In the frame with the anchors, set the anchor's target attribute to a named frame, i.e.
<a href="your_dynamic_page.php?your_var=1" target="frame1">
This will call your dynamic page in the other frame passing in the value for "your_var".
G'luck,
Jack