I am in need of a page, which can take the template called "home" which is inside the database in the table "templates" where ID="1". Also inside this "home" template in database, I need to have a lot of html, but also need to have some PHP functions. I have spent long time to do so the database template can include PHP codes, such as a code which takes the template called "header" or "footer" inside the database. And put that on the page.. Hope someone would be able to help with me this, as I have tried so many things now. I am willing to pay the one which makes this working.
Any reason why your template is called 'home' ? An easier way instead of bad pagination in your database of all that string code which could possibly inject itself on uploads if you're not removing html characters , but to do that you're destroying the code. would be to use a text file and have different folders for different categories of code snippets, functions,handlers etc and then just call them from a text file, and an interface you makefrom a basic textarea box that you copy/paste code into and have it fopen write to a text file. Then recall it by fread and copy the text file into your HTML and PHP codes. It sounds to me like what you're trying to do is make a website where people can select what colors,functions, and other stuff they want on a website and have it automatically output a complete website for them in either HTML/ PHP or combo. Store your CSS style sheets to text files, inside a CSS style sheets folder, give the folders theme names = red_blue, chrome_metal, etc and label the text files of the CSS style sheets as 1.txt , 2.txt Then use the database if you have to, to let them select themes and theme 1 would be equivalent of red_blue etc (you or other user selecting on a interface 'Build It' page. The database will select theme 1 from database that will have the name of text file (for easier control and updating to keep track of folders with thousands of txt files ) the database will have the table name of = "theme" for red_blue,chrome_metals etc That will then grab the text file name and send it to a PHP handler,the handler will insert the text file as the fopen and read functions variable data, and willexecute code to open the text file and grab the text from that text file and then paste it into the HTMl/ or PHP file where designated by PHP code like this: echo $CSS_theme Building websites with code like Legos , and letting users select themes, functionality etc. Storing maximum 255 character lengths or more to database is gonna kill your pagination for longer load times and SQL database function ...as opposed to just a CSS Theme [1] Name [Red_Blue] TextFile [1263] Where the bulk of mass file text on CSS etc , especially extensive PHP functions of If/Else, Handlers etc ..would be better in text files, called by database. Good luck, I always thought of making a full one of those types of sites, but I was goingto have A.I. do it. (but I dont have a full list of nouns,verbs, adverbs etc) lol because I want people typing to the A.I. to be read and for the A.I.to understand content and meaning by the word types. Example: "I want a website" (response= "what kind of things do you need your website to do?" (and asks questions to to decide if it will be HTMl, PHP etc,then it would piece everything together.
i think this tutorial could help you a lot : Creating a Website Design Templating System Using PHP Although it does not have mysql but it can help you think forward. Good luck