Okay, My website(dev area only, not viewable by public) works fine right now except I'm not sure that it is done correctly. I'm using Smarty as my main template engine. My site map is: htdocs -------------------------- --index.php --.htaccess --/cache (smarty folder) --/configs (smarty folder) --/inc ------- --main.php (settings, configuration, etc.) --mysql.class.php (mysql class, does NOT call/start the class) --funcs.php (misc functions on the site.) --navigation.php (for my mod_rewrite/navigation,etc) ------- --/libs (smarty folder) --/templates (smarty folder) (holds index.tpl, register.tpl, etc, just the template designs) ------- --/code (this is a folder that I created that holds the code for register,etc, pages that need php code.) ------- --/templates_c (smarty folder) My index.php calls my mysql class and all of the files in "/templates/code/" folder call it also. I don't understand why I have to call this every time. Here's a map below (key: -> means display) index.php -> index.tpl -> code/index.php Why do I have to call the mysql connection both in index.php and index.php in the code folder? Any Ideas?