me1000 Posted November 11, 2006 Share Posted November 11, 2006 ok here is what my pages look like...[code]<?$id = "1" ; $title = "Main Page" ; $restricted = "0 " ; $keywords = "home page main " ; $type = "1" ; ?> <HTML>lalala</HTML>[/code]I need to access the $title var, to put it in the <title> tag it will also be accessed in the page and printed there...The the restricted needs to be accessed before the rest of the page, the $type needs to be accessed in the page itself that the user sees.Then all the HTML needs to be included like you would include a regular file...im currently using this code on my tempate page to access the site.[quote]<? if ($page == "") { include("home.php"); } else { include($page.".php"); } ?>[/quote]how can i expand upon that to give me what i need?Thanks, Link to comment https://forums.phpfreaks.com/topic/26895-vars-from-part-of-a-page/ Share on other sites More sharing options...
me1000 Posted November 11, 2006 Author Share Posted November 11, 2006 now im pretty sure this is posible! ... Link to comment https://forums.phpfreaks.com/topic/26895-vars-from-part-of-a-page/#findComment-123175 Share on other sites More sharing options...
me1000 Posted November 12, 2006 Author Share Posted November 12, 2006 if i did something like this on ever page would it work?[code]<?$id = "1" ; $title = "Main Page" ; $restricted = "0 " ; $keywords = "home page main " ; $type = "1" ; $pagecode =' ?> <HTML>lalala</HTML><?';?>[/code] Link to comment https://forums.phpfreaks.com/topic/26895-vars-from-part-of-a-page/#findComment-123660 Share on other sites More sharing options...
trq Posted November 13, 2006 Share Posted November 13, 2006 Sorry... what is your question? Link to comment https://forums.phpfreaks.com/topic/26895-vars-from-part-of-a-page/#findComment-123667 Share on other sites More sharing options...
me1000 Posted November 13, 2006 Author Share Posted November 13, 2006 i need to include a page with the above code in a template page (index.php)I need the vars, before the page is rendered.but if i include it above the <head> tag i get the HTML printed in the wrong space (at the top of the page)any ideas?? Link to comment https://forums.phpfreaks.com/topic/26895-vars-from-part-of-a-page/#findComment-123668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.