Variables
Posted: Tue Jan 06, 2004 11:58 am
Hello. I am a total newbie to PHP.
Wonder how to get this right. This is a part from the index.php of my website. This page should display the same header and footer to any $html page I have defined in index.php. I know the code is (very) wrong so, please help
then it goes like this
Wonder how to get this right. This is a part from the index.php of my website. This page should display the same header and footer to any $html page I have defined in index.php. I know the code is (very) wrong so, please help
Code: Select all
<?php
$pagina = $_GET["pagina"];
if ($pagina=="") $pagina="Home";
if ($pagina="Home") $html="body.html";
if ($pagina="Contact") $html="contact.html";
?>Code: Select all
<?php
include "header.html";
include "$html";
include "footer.html";
?>