I’m using an include script to display the title of each page with the html tag as follow:
First, I include each page:
if ( (isset($_GET['page'])) && (isset($checkPage[$_GET['page']])) ) {
include($checkPage[$_GET['page']]);
with this include.php script:
$checkPage = array('Livre' => 'livre.php',
'Star_Trek' => 'startrek/startrek.php',...);
to secure my links.
Second, I’m using this title script to display the page and tab titles:
HTML:
<title>
<?php
if ( (isset($_GET['category'])) && (isset($checkTitle[$_GET['category']])) ) {
echo $checkTitle[$_GET['page']].' - '.$checkTitle[$_GET['category']];
}
elseif ( (isset($_GET['page'])) && (isset($checkTitle[$_GET['page']])) ) {
echo $checkTitle[$_GET['page']];
}
else {
echo 'Accueil';
}
?>
</title>
and this title.php script:
$checkTitle = array('Livre' => 'Livre d\'Or',
'Star_Trek' => 'Star Trek', ...);
But, the TV Series section displays each record from the database.
Here, I’m using this link from series menu display, using the series Id to search the database:
echo '<p><a href="accueil.php?page=Series_Record&series='.$row['seriesId'].'">'.$row['seriesTitle'].'</a></p>';
I tried everything without success to display the title in the browser’s tabs. It should display “Record - *Series Title”.
The only working thing is this one, but it causes a security issue:
echo '<p><a href="accueil.php?page=Series_Record&series='.$row['seriesId'].'&title='.$row['seriesTitle'].'">'.$row['seriesTitle'].'</a></p>';
Could someone help, please ?