JakkkeM Posted December 6, 2012 Share Posted December 6, 2012 Hey I'm creating a small system for a high school project, and I need to be able to control content on the front end from the back end. I've hooked most of it up successfully however now I have a small dilemma. How it works is you edit a "website layout" page, which shows you raw HTML (shown below) and you put in a bb code of "[element=title]" for example, and this is then converted into a function which displays the content of that database entry... These elements are then individually edited. However, I now have the need to display some PHP in elements... For example, as seen below, determining what menu you see depending on your level of access or if you're signed in... BUT... When this get's to the output: My PHP is a string... Any suggestions? Thanks... Link to comment https://forums.phpfreaks.com/topic/271669-php-handling-problem/ Share on other sites More sharing options...
JakkkeM Posted December 6, 2012 Author Share Posted December 6, 2012 FOR THE RECORD: I do realise that the code I have in there only determines if you're logged in then calls your name - debugging purposes haha Link to comment https://forums.phpfreaks.com/topic/271669-php-handling-problem/#findComment-1397816 Share on other sites More sharing options...
trq Posted December 6, 2012 Share Posted December 6, 2012 If your trying to execute php code you have stored in your database your doing it wrong. Link to comment https://forums.phpfreaks.com/topic/271669-php-handling-problem/#findComment-1397817 Share on other sites More sharing options...
JakkkeM Posted December 7, 2012 Author Share Posted December 7, 2012 If your trying to execute php code you have stored in your database your doing it wrong. That's it. Haha how should I approach it? Link to comment https://forums.phpfreaks.com/topic/271669-php-handling-problem/#findComment-1398028 Share on other sites More sharing options...
trq Posted December 7, 2012 Share Posted December 7, 2012 You would need to write logic into your code to load template data conditionally. Link to comment https://forums.phpfreaks.com/topic/271669-php-handling-problem/#findComment-1398030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.