Originally Posted by ast3r3x
To have the same code show up on everypage simple add this to your html (php must be installed on the server):
I'm pretty sure that is how you do it. Your web page probably has to end in .php instead of html or whatever, it won't effect anything though.
You just put the repeating code in that file and then it will be placed wherever you have the include().
I'm sure someone will come tell me I'm wrong but I tried
If you want to learn PHP without buying a book there isn't a place better then php.net
If you want you can set php to parse .html pages to mask your use of php. Here is another example of a php include:
You can make a file called left_nav.php and place it in a directory somewhere (in the apache htdocs tree), I suggest in the "folder" where your .html/.php files will be server from. left_nav.php will contain any text/html/php that you want.
means what it says, only include this file once even if called more than once.
BTW: you can also nest includes, ie. have an include file call another include file.