Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 16-04-2009
Member
 
Join Date: Nov 2008
Posts: 996
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>
Reply With Quote
  #2  
Old 16-04-2009
Member
 
Join Date: May 2008
Posts: 945
Re: Problem php AND html

You want different menus on each page, right?
Reply With Quote
  #3  
Old 16-04-2009
Member
 
Join Date: Nov 2008
Posts: 996
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.
Reply With Quote
  #4  
Old 16-04-2009
Member
 
Join Date: May 2008
Posts: 945
Re: Problem php AND html

You can do it in php with a function that will call the appropriate menu.
Reply With Quote
  #5  
Old 16-04-2009
Member
 
Join Date: May 2008
Posts: 2,293
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?
Reply With Quote
  #6  
Old 16-04-2009
Member
 
Join Date: May 2008
Posts: 2,008
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problem php AND html"
Thread Thread Starter Forum Replies Last Post
Urgently Needing Answer Html Problem Please Help dillon78 Software Development 1 10-04-2012 11:49 AM
Problem viewing Jpeg file in html Galeny Software Development 5 06-02-2010 01:42 AM
Problem Loading Flash in HTML Kusagra Software Development 4 25-03-2009 10:42 AM
Html link code problem ByteCoder Software Development 4 09-02-2009 06:49 PM
HTML/CSS Percentage problem Soft Pack Software Development 3 05-01-2009 11:00 PM


All times are GMT +5.5. The time now is 09:54 PM.