Like any other part of your page, you can whack variables into meta tags, too. You need to define the keywords/titles you'd like as variables in the file you want. So, for "Red widgets"...
At the top of your PHP red_widgets.php file:
PHP Code:
<? $keyword = "Red widgets"; ?>
<?php include('header.inc.php'); ?>
At the beginning of header.inc.php:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><? if ($title) { echo $title;} else { echo "Widgets.co.uk"; } ?></title>
<meta name="description" content="<? if ($description) {echo $description; } else { ?>Get your widgets here... <? } ?>" />
<meta name="keywords" content="<? echo $keyword; ?>">
</head>
As you can see, your red_widgets.php defines the keywords, description etc. Then, it tells the header to actually output these... make them actually do something. Take a look at the above code, and you'll see that you can also set the title & description to be default if they're left blank.
Of course, next thing is to set the variables... your way. I'll let you find a way to do that, but I hope this is a starting point 
|