<?php
$sqlInfoSite = " select * from site where idSite=4";//replace by nomSite=$_GET['nomSite']
$reqInfoSite = mysql_query($sqlInfoSite) or die ('Erreur SQL:'.$sqlInfoSite.'<br>'.mysql_error());
$infoSite = mysql_fetch_assoc($reqInfoSite);
if (isset($_GET["page"])) $sqlInfoPage = " select * from page where idPage=".$_GET["page"];
else $sqlInfoPage = " select * from page where idPage=".$infoSite['idPageHome'];
$reqInfoPage = mysql_query($sqlInfoPage) or die ('Erreur SQL:'.$sqlInfoPage.'<br>'.mysql_error());
$infoPage = mysql_fetch_assoc($reqInfoPage);
?>
<html>
<head>
<title><?php echo $infoSite["nomSite"] ?> : <?php echo $infoPage["titrePage"] ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#6666FF" text="#000000" style="margin:0;">
<table width="80%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td bgcolor="#FFFFFF"><b><a href="./index.html"><?php echo $infoSite["nomSite"] ?></a></b></td>
</tr>
<tr>
<td bgcolor="#FFCC66">
<?php echo $infoSite["menuSite"] ?>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<?php echo $infoPage["contenuPage"] ?>
</td>
</tr>
</table>
</body>
</html>
Partager