lovelyjitu Posted November 3, 2007 Share Posted November 3, 2007 Hi Guys, I want to create a simple home page with a header, menu and footer. So, I create three tables Ist is for header.php, IInd is for menu.php and IIIrd is for footer.php and menu.php and footer.php contains as:- Home contact us about us link Here is the codding for it as given:--- ========================================= <html> <head> <title>My First Web Site</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <table height="80" width="100%" border="5" ><td width="160"</table> <table height="100%" border="5" width="100" cellspacing="0" cellpadding="2"> <tr> <td valign="top" align="left" width="80"> <br /><br /><br /><br /> <a href="file:///C:/Documents%20and%20Settings/rajkumar/Desktop/data.html">Home</a> <a href="contact.php">Contact Us</a> <a href="aboutus.php">About Us</a> <a href="links.php">links</a> </td></tr></table> <table height="80" border="5" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="center" align="center" width="100%"> <a href="file:///C:/Documents%20and%20Settings/rajkumar/Desktop/data.html">Home</a> <a href="contact.php">Contact Us</a> <a href="aboutus.php">About Us</a> <a href="links.php">links</a> </td></tr></table> </body> ======================================= But I want to If I click on any of contact us about us link It should open in the middle part of the template. So, tell me plz how it can be done and give me coding for it if possible. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/75888-need-help-integration-of-header-menu-and-footer-in-php/ Share on other sites More sharing options...
ignace Posted November 3, 2007 Share Posted November 3, 2007 <!-- start header.php --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" type="text/css" href="style.css" /> <title>My First Web Site</title> </head> <body> <!-- end header.php (should include your menu to) --> <!-- start footer.php --> </body> </html> <!-- end footer.php --> <!-- start index.php echo file_get_contents is faster then include_once() --> <?php echo file_get_contents("header.php");?> <!-- start content --> <table height="80" border="5" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="center" align="center" width="100%"> <a href="data.html">Home</a><!-- file:// won't work --> <a href="contact.php">Contact Us</a> <a href="aboutus.php">About Us</a> <a href="links.php">links</a> </td> </tr> </table> <!-- end content --> <?php echo file_get_contents("footer.php");?> i was so friendly to correct your html code, i also suggest you read PHP 5 Advanced which will give you an introduction into modules: http://www.amazon.com/PHP-Advanced-Visual-QuickPro-Guide/dp/0321376013 Quote Link to comment https://forums.phpfreaks.com/topic/75888-need-help-integration-of-header-menu-and-footer-in-php/#findComment-384121 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.