Hi everyone,
I am new to php and after reading various articles about it, I want to convert my website from frames, to a dynamic site using php. (www.firewall.cx)
Even though I have started this conversion, I have alot of questions and I am seeking answers from you who are experienced with php.
1) I have created my index.php which reads:
<html>
<head>
<title>Firewall.cx - Internetworking Firewalls and Networks</title>
</head>
<body>
<?php
require("header.php");
?>
<table width="100%" cellspacing="15" cellpadding="5" border="0">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="29" valign="top">
<?php
if ($c != "") {
include("".$c);
} else {
include("home.htm");
}
?>
</td>
</tr>
</table>
</body>
</html>
The header.php is placed up the top of the page and right below it is where the home.htm file is loaded , or any other file selected from the menu.
The files selected from the main menu are not wrapped using <?php ?> and yet they seem to load perfectly in the dynamic page created ! These files are normal html files and already contain the <head> <body> e.t.c tags, and are placed within the ones generated by php ! Would it be a problem the way I have it setup or do i need to remove all <head> and <body> tags from my html files ?
If you need to see the above result, goto www.firewall.cx/php from the menu goto Firewalls and then Introduction, once the page is loaded, look at the source code and you will see the multiple <head> and <body> tags.
2) Because I am using frames, I need special code in each html file to make sure that the frame is constructed and have the header.html file loaded up the top, if someone visits any html file directly e.g from a search engine.
This is a common problem with frames, and I need to know how I can get around this problem using php.
Any help, input is appreciated !
Thanks in advanced.