Hey guys,
So I haven’t done any php in a good 15 years and need to use some for my website. I would like to have the following:
Each page will look like this (this is what I am labelling “home.php”):
[php]<?php include (‘template.php’);
echo “$header”; ?>
Is this going to work. <? echo "$footer";?>[/php]
I was then hoping to have a template.php where all the code is stored like the following:
[php]<?php
$header = ’
Untitled 1 .auto-style1 { background-color: #2F2F2F; } .auto-style2 { background-color: #C0C0C0; background-image: url('images/upper_page.jpg'); } .auto-style3 { border: 1px solid #000000; } .auto-style4 { text-align: right; background-image: url('images/header.jpg'); } .auto-style5 { text-align: center; background-color: #2F2F2F; background-image: url('images/middle_page.jpg'); font-family: Calibri; } .auto-style6 { background-color: #2F2F2F; background-image: url('images/lower_page.jpg'); } .auto-style7 { font-family: Calibri; } .auto-style10 { text-align: center; background-color: #C0C0C0; } .auto-style11 { text-align: left; } .auto-style13 { border-width: 0px; margin-right: 0px; } .auto-style14 { text-align: center; }
|
||||||||
|
||||||||
';[/php] [php]$footer = ’ |
||||||||
|
||||||||
|
?>[/php]
I keep getting errors… can someone please give me a hand?
Cheers,
Scott
- Mod added code tags