Ok, I have made a few changes, whether they are for the better or not I will take advice. Currently in my fetchmeta.php file I have

PHP Code:
$sql "SELECT*
        `description`, `keywords`, `author`, `copyright`, `email`, `rating`, `robots`, `revisit`, `expires`, `distribution`*
        FROM `meta_data` WHERE `meta_id` = 
{$page_id}";
        
$query $db->query($sql);
        if(
$query == false) {
            
            die(
"<pre>".print_r($db->errorInfo(), 1).PHP_EOL.$query."</pre>");
        }
        while(
$row $query->fetch(PDO::FETCH_ASSOC)) {
            echo 
"<meta name=\"keywords\" content=\"{$row['keywords']}\" />\n" ;
            echo 
"<meta name=\"copyright\" content=\"{$row['copyright']}\" />\n" ;
            echo 
"<meta name=\"author\" content=\"{$row['author']}\" />\n" ;*
            echo 
"<meta name=\"email\" content=\"{$row['email']}\" />\n" ; **
            echo 
"<meta name=\"Distribution\" content=\"{$row['distribution']}\" />\n" ;*
            echo 
"<meta name=\"Rating\" content=\"{$row['rating']}\" />\n" ;*
            echo 
"<meta name=\"Robots\" content=\"{$row['robots']}\" />\n" ;
            echo 
"<meta name=\"Revisit-after\" content=\"{$row['revisit']}\" />\n" ;
            echo 
"<meta name=\"expires\" content=\"{$row['expires']}\" />\n" ;
            echo 
"<title>" $row['title'] . "</title>\n";




        } 
The title still is not working although have tried inside the while loop as well as outside.

The results from this code gives me every page meta information on the homepage.

Can anyone advise please, thanks.