Computer help and technical support at WBHelp.com  

Go Back   Computer help and technical support at WBHelp.com > PC Help: Hardware, software > PC help

PC help Hardware and operating systems

Reply
 
Thread Tools Display Modes
Old 12-01-2004, 10:37 PM   #1
joop
Member
 
Join Date: Nov 2004
Posts: 58
Default My PHP class is not displaying it's contents the way i need

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:

Code:
<?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.

Code:
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:

Code:
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.
joop is offline   Reply With Quote
Old 12-02-2004, 12:12 AM   #2
joop
Member
 
Join Date: Nov 2004
Posts: 58
Default I fixed it lol

Sorry about that - ive done it - The code i post had absolutly nothing to do with it, It was the menu bar - i needed to just add another <TR><TD> hehehe ops:
joop is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:33 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2004-2006 WBHelp and Woollybear Web. All rights reserved.