-
Problem php AND html
Here is my problem
I have at the moment thanks to the following script placed in my "base.php" managed to have a fixed menu (with footer in header) and only the page that moves; what I want is to have the same thing with menus that I put in my different pages ...
As you can see my main pages are "p.html" there is not that the text of php. I have over my "base.css" who now manages the design of the entire site. That is what I request is possible? Am I crazy to want to do this? Any reorganization should I? can you brief me
HTML Code:
<!-- The header -->
<div id="in_header">
</div>
<!-- The menus -->
<div>
<ul id="menu_horizontal">
<li><a href="./design.php?p=home">Home</a></li>
<li><a href="./design.php?p=fruits">Our seasonal fruit</a></li>
<li><a href="./design.php?p=sweets">Our Sweets</a></li>
<li><a href="./design.php?p=contact">Contact</a></li>
</ul>
</div>
<div>
<!-- The body -->
<div id="body">
<?php
if(isset($_GET['p'])){
$p=strtolower($_GET['p']);}
if(isset($p) && preg_match("/^[a-z0-9]+$/i",$p)){
$p=$_GET['p'];
if(file_exists("pages/$p.html" )){
include "pages/$p.html";
}
else{
include "pages/404.html";
}
}
else{
include "pages/404.html";
}
?>
</div>
<!-- Footer page -->
<div id="Footer_page">
<p>Copyright "Any rotten Corporation" 2005, All rights reserved</p>
</div>
</body>
</html>
-
Re: Problem php AND html
You want different menus on each page, right?
-
Re: Problem php AND html
of "menus"
example I have 4 main sports page of the ball, auto, water sports athletics. I will make sub-menu with football-rugby-hand volley f1-rally etc.
-
Re: Problem php AND html
You can do it in php with a function that will call the appropriate menu.
-
Re: Problem php AND html
and so if we want to go to Rugby must first go to sport? the average age is your idea. Menu and sub menu accessible from the beginning it's not user-friendly?
-
Re: Problem php AND html
Well, you can use an include for the sub-menu and another for the content. One may be contained in the page of another, it depends on the structure of your site. If you understand the script you posted below, I think you have the necessary level in PHP.
Page generated in 1,713,958,110.41005 seconds with 10 queries