Jump to content


Photo

page in a page**SOLLVED**


  • Please log in to reply
7 replies to this topic

#1 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 30 July 2006 - 10:33 PM

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...)
"Syntax error" .. WHERE THE **** IS IT?!

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 30 July 2006 - 10:35 PM

Pardon?

#3 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 30 July 2006 - 10:40 PM

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?
"Syntax error" .. WHERE THE **** IS IT?!

#4 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 30 July 2006 - 10:47 PM

maybe sockets?
"Syntax error" .. WHERE THE **** IS IT?!

#5 DocSeuss

DocSeuss
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts
  • LocationTexas, USA

Posted 30 July 2006 - 10:53 PM

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.

"Unlimited budget? Great, for $5,000,0000 we will run your ad banner for one year"  ----Rasmus Lerdorf

#6 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 30 July 2006 - 10:59 PM

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!
"Syntax error" .. WHERE THE **** IS IT?!

#7 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 30 July 2006 - 11:08 PM

Sounds to me like you just need include().

#8 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 30 July 2006 - 11:14 PM

yup! ;D, i just blanked!, Thx
"Syntax error" .. WHERE THE **** IS IT?!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users