To change the blog name to "PHP and MySQL Zone," modify the config.php as follows:
<?php // put full path to Smarty.class.php require('/usr/share/php/Smarty/Smarty.class.php'); $smarty = new Smarty(); $smarty->template_dir = '/home/www/htmlkb/smarty/templates'; $smarty->compile_dir = '/home/www/htmlkb/smarty/templates_c'; $smarty->cache_dir = '/home/www/htmlkb/smarty/cache'; $smarty->config_dir = '/home/www/htmlkb/smarty/configs'; $blog_title="PHP and MySQL Zone"; ?>
Solution to Question 16-2
From the MySQL client, execute the SQL query:
insert into categories values (NULL, 'Bugs');
You can also add the row using phpMyAdmin. Because the drop-down category list is created dynamically, this is the only change required to add a new category.
Solution to Question 16-3
Templates make it easy to keep your site organized. Changes made to the header and footer automatically apply to all pages. Also, editing the HTML is easier because there isn't any PHP code mixed in with it.