943,923 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3228
  • PHP RSS
Feb 7th, 2006
0

page layout help!!!!

Expand Post »
Please please please i need a bit of help, with setting my php site layouts. I have decided to use tables instead of page frames for various reasons.

I am now however having some problems with getting my page to display as I wish, so if anyone could please give advice.

O.K here's the index page (This page consist of the tables layout >> header, left panel, middle section, right panel, and the footer).

This is the coding of the middle section, which automatically calls the homepage.php and displays it.

echo '<td bgcolor="#ffffff">';

$call= changelocation('homepage');

function changelocation($location)
{
switch ($location)
{
case 'homepage': include('homepage.php');
break;
case 'category': include ('category.php');
break;
}

The first part of this works fine. but when i change the value of $location from another page as shown below:

$position = 'category';
changelocation($position);

it does displays the category.php but it displays the result outside the table.

I am really confused. I have tried diffrent approaches and just can't get it to work.

is there any suggestion or alternative way of working with pages layout?.

what i am trying to do is get the category.php to display and get rid of homepage.php showing. but instaed both pages are still displaying. (homepage.php in the middle section and category.php outside the table, after the page footer)..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nike123 is offline Offline
20 posts
since Jun 2005
Feb 7th, 2006
0

Re: page layout help!!!!

I think you'r are including a complete webpage. Remember it's not valid to have several html, head and body elements.

just check the source of you category.php file

greetz Olaf
Reputation Points: 10
Solved Threads: 0
Newbie Poster
olaf is offline Offline
10 posts
since Sep 2005
Feb 7th, 2006
0

Re: page layout help!!!!

no there's no head or footer or body in my category page. plus this is a . php page.
i just need some advice on changing the display of the middle section from one php page to a next. is there aslternative way of doing this?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nike123 is offline Offline
20 posts
since Jun 2005
Feb 11th, 2006
0

Re: page layout help!!!!

[PHP]$call= changelocation('homepage');

function changelocation()
{
switch ($_REQUEST['location'])
{
case 'homepage': include('homepage.php');
break;
case 'category': include ('category.php');
break;
}[/PHP]

Looks like you don't have register_globals enabled. So you should use $_GET or $_REQUEST. Try the code above. Hope it solves your problem.
PoA
Reputation Points: 19
Solved Threads: 9
Posting Whiz in Training
PoA is offline Offline
234 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: any good tutorials on image thumbnails?
Next Thread in PHP Forum Timeline: Simple Banned Words Filter





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC