yes, fellas.
there probably is a better way to get things done. however, as i mentioned, my method works well for me.
the reason for this is simple. my script is a basic script used to update the links for my personal homepage(PHP <grin>). there wouldn't be anyone else using the script except for me. i just needed a way for dynamic generation of links to various pages of my website.
besides not having to update every html page to include the new link, this also serves as a learning experience for me to pick up php.
so, if any of you have done a similar script, a more reliable one, with multi-user support and what not, please post a solution here, instead of critisizing the way some people do things.