I think you want:
page_with_frames specifies (at least) two frames:
frame1.html <frame name="base_frame"...
frame2.html <frame name="target_frame"...
your link should be:
<a href="page" target="target_frame">
I guess you're assuming HTML is somehow different when generated by PHP. It is not.
Good luck,
Luciano ES
Santos - SP - Brasil