joop
12-01-2004, 10:37 PM
Hello im moving on gradually with my php lessons, ive started to build (sorry attempting to build) my site by using require(file.php) (or .inc for ease of remembering what file is what).
My contents does not display so good after i have created a header and menu bar. The table for the contents overlaps the menubar slightly.
Can u see why - co's i can't:
<?php
require('page_class.inc');
$homepage = new Page();
$homepage->SetContent("<table width='500' height='300' align='center' border='1'>
<tr>
<td align='center' valign='middle'>
<p>Welcome to Inciter.org.uk, this is a test page.</p>
</td>
</tr>
</table>");
$homepage ->Display();
?>
The above is the code for my simple test.php page.
function Display()
{
echo "<html>\n<head>\n";
$this -> DisplayTitle();
$this -> DisplayKeywords();
$this -> DisplayStyles();
echo "</head>\n<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0'>\n";
$this -> DisplayHeader();
//$this -> DisplayMenu($this ->buttons); //Not in use
$this -> DisplayMenuWithButtons();
echo $this -> content;
$this->DisplayFooter();
echo "</body>\n</html>\n";
}
The above again - is the code that loads each content onto the page.
The echo $this->content; is the part in focus. The other Function in relation to this is:
function SetContent($newcontent)
{
$this->content = $newcontent;
}
Am i really gonna need to format the newcontents? - Please say no lol.
To view the final output goto: http://www.inciter.org.uk/testclass.php
It's weard isn't it lol - it covers the Home button slightly.
My contents does not display so good after i have created a header and menu bar. The table for the contents overlaps the menubar slightly.
Can u see why - co's i can't:
<?php
require('page_class.inc');
$homepage = new Page();
$homepage->SetContent("<table width='500' height='300' align='center' border='1'>
<tr>
<td align='center' valign='middle'>
<p>Welcome to Inciter.org.uk, this is a test page.</p>
</td>
</tr>
</table>");
$homepage ->Display();
?>
The above is the code for my simple test.php page.
function Display()
{
echo "<html>\n<head>\n";
$this -> DisplayTitle();
$this -> DisplayKeywords();
$this -> DisplayStyles();
echo "</head>\n<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0'>\n";
$this -> DisplayHeader();
//$this -> DisplayMenu($this ->buttons); //Not in use
$this -> DisplayMenuWithButtons();
echo $this -> content;
$this->DisplayFooter();
echo "</body>\n</html>\n";
}
The above again - is the code that loads each content onto the page.
The echo $this->content; is the part in focus. The other Function in relation to this is:
function SetContent($newcontent)
{
$this->content = $newcontent;
}
Am i really gonna need to format the newcontents? - Please say no lol.
To view the final output goto: http://www.inciter.org.uk/testclass.php
It's weard isn't it lol - it covers the Home button slightly.