Can someone help me with creating frames via PHP instead of HTML? I know there are suppose to be several php files where you "stick" them together in 1 HTML file.. so when you edit 1 page (ex: the navigation) the rest of the site doesn't need to be edited manually since it will appear on the other pages too... basically what iframes (in HTML) do, but in PHP. Does anyone know where I can find a generator or help me create one? I only need a header, navigation and content area. Thank you
The idea is you have a header and footer file, that you include in every page, then it appears to the browser as just one page: <?php include ('header.php'); echo "Web page content"; include ('footer.php'); ?> PHP:
Thanks So I now have 2 PHP files (header and footer) and I created an index.html page with that code above.. now how do I make the header and footer.php appear on the page? (index.html) Thanks
You need to rename the index file to .php (or there's other solutions but this is easiest). If you make index.php with: <?php include 'header.php'; ?> blah di blah <?php include 'footer.php'; ?> Code (markup): When you view the index page in your browser it will print out the contents of the header.php file, followed by 'blah di blah', followed by the contents of the footer.php file.
Finally had the time to work on this. When I used the code, I didn't need to add any width or height, it adjusted it automatically for me!! it's PERFECT And it works thanks!!