or you could make this stuff into a template class and give yourself full error checking instead of relying on the human memory which has more holes then swiss chess.
Here:
<?php
class template {
var $title,$doc_type,$meta_keywords,$meta_description,$init;
function template() {
$this->init = 0;
} //end template
function inititialize($title,$doc_type,$meta_keywords,$meta_description) {
$valid_doc_types = array('doctypestring1','doctypestring2');
if($title == "" || strlen($title) > 50) {
die("Please enter a title of up to 50 characters.");
} //end if
if(!in_array($doc_type,$valid_doc_types) {
$valid = implode(", ",$valid_doc_types);
die("Please enter a valid doc type ($valid).";
} //end if
etc