| | |
page layout help!!!!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2005
Posts: 20
Reputation:
Solved Threads: 0
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)..
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)..
•
•
Join Date: Jul 2004
Posts: 234
Reputation:
Solved Threads: 8
[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.
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.
![]() |
Similar Threads
- Needing Expert Advice On Desktop Computer (Troubleshooting Dead Machines)
- The Best Free Web Host? (Web Hosting Deals)
- Align floated images in center of page with CSS (HTML and CSS)
- Design and Layout preference.... ? (Site Layout and Usability)
- What Am I Doing Wrong? (HTML and CSS)
- Printing Web Page (Windows 95 / 98 / Me)
Other Threads in the PHP Forum
- Previous Thread: any good tutorials on image thumbnails?
- Next Thread: Simple Banned Words Filter
Views: 2449 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database dataentry date directory display download dynamic echo email error file files firstoptioninphpdroplist folder form forms freelancing function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial tutorials update updates upload url validation validator variable video web white xml youtube





