Page 1 of 1

My First CMS type Web App

Posted: Mon Mar 19, 2007 6:48 pm
by seodevhead
Hey guys... quick question regarding the design of a web app I am creating.

This web app is a CMS-type application that will allow me (super-admin) to create various pages that host all kinds of different content, from videos to music to articles.

The problem I am running into is that I would like to have complete control over the look and feel of each individual page that is created. So what I was thinking about was in the admin section where I actually setup each page, have a <textarea> input where I can just copy and paste all the PHP/XHTML that I want for between the <body> tags. Can I do this? Can I input PHP into my database and have it outputted as PHP within my scripts later when the page is called? The PHP should be parsed of course.

Posted: Mon Mar 19, 2007 6:58 pm
by alex.barylski
eval() but thats messy...and if memory serves correct, can *only* parse pure PHP no embedded HTML...

What I have thought about in the past is caching the PHP/HTML to a temp file and calling include()

Posted: Tue Mar 20, 2007 11:45 am
by Begby
You can put php in your database but don't, its not the best of ideas due to security.

You are better off just including a header and a footer or only storing the actual HTML content in the database.