Over ten years ago, I put all my webpages in databases, why I don't remember. One reason could have been so that readers could look up specific terms. My site teaches English. The content of the database entries is very different but the pages that use the databases are very similar, most of them are like this one:
<?php
$page_title="...";
include('header001.html');
?>
<h1>...</h1>
<h2>...</h2>
<br>
<?php
$dbhost="...";
$dbname="...";
$dbuser="...";
$dbpass="...";
// Create connection
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM ... WHERE ...='25'OR ...='26'";
$result = $conn->query($sql);
$i=0;
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<i>'.$row['text'].'</i>';
echo $row['exemple'].'<br>';
}
} else {
echo "0 results";
}
$conn->close();
include("footer1.html")
?>
In webmaster tools, google says that I have many duplicate pages, could the fact that they all have very similar php content be the reason why?