Jump to content

Archived

This topic is now archived and is closed to further replies.

legohead6

page in a page**SOLLVED**

Recommended Posts

Hi, i have a "my account page" on a website im creating and its set up in a table and on the left is a navagation and on the right i want to have the page its told to use display... when i user click on a page in the navagation it links to to this page the a GET variable telling it what page... then i use a switch to find what to do... but how do i turn what in a page into a variable but still have the php on those pages work..(each page has php too like if's and database commands...)

Share this post


Link to post
Share on other sites
lol..k here it goes again

I have a page(profileh.php) or aka "My account". It has a navagation of its own for users to use like edit personal settings and stuff like that. The links on that navagation are all <a href=profileh.php?a=(page)> then i use a switch command to find out what page it wants

then i want that page to display in a designated area on profileh.php and have that pages php code still work! maybe fopen? but does that allow php to still work?

Share this post


Link to post
Share on other sites
Sounds like you all you want to do is change the html output based on the setting of the variable a in the url.

Your basically on the right track using a switch statment just inside each switch statment set a variable($content) to the html you wish displayed the print or echo out the $content variable when and where you want it shown.

Share this post


Link to post
Share on other sites
no...the switch tells what page i want... then i want the content of that page displayed..but those pages also have php code of there own! thats the problem!.. and i dont want to have a 300 line code with the code of all pages on the profileh.php page!

Share this post


Link to post
Share on other sites
Sounds to me like you just need [url=http://php.net/include]include[/url]().

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.