legohead6 Posted July 30, 2006 Share Posted July 30, 2006 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...) Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/ Share on other sites More sharing options...
trq Posted July 30, 2006 Share Posted July 30, 2006 Pardon? Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66139 Share on other sites More sharing options...
legohead6 Posted July 30, 2006 Author Share Posted July 30, 2006 lol..k here it goes againI 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 wantsthen 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? Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66140 Share on other sites More sharing options...
legohead6 Posted July 30, 2006 Author Share Posted July 30, 2006 maybe sockets? Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66144 Share on other sites More sharing options...
DocSeuss Posted July 30, 2006 Share Posted July 30, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66147 Share on other sites More sharing options...
legohead6 Posted July 30, 2006 Author Share Posted July 30, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66149 Share on other sites More sharing options...
trq Posted July 30, 2006 Share Posted July 30, 2006 Sounds to me like you just need [url=http://php.net/include]include[/url](). Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66152 Share on other sites More sharing options...
legohead6 Posted July 30, 2006 Author Share Posted July 30, 2006 yup! ;D, i just blanked!, Thx Quote Link to comment https://forums.phpfreaks.com/topic/16055-page-in-a-pagesollved/#findComment-66155 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.