PHP is a better method, but to get the "frames" effect, you'd need to use
AJAX. It's fairly complicated, but there are several scripts available for you to use.
PHP is a better solution, but it will reload the pages entirely. If that's not what you want, here's an example script:
http://dynamicdrive.com/dynamicindex17/ajaxcontent.htm