best way to save a template

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rubenhan
Forum Newbie
Posts: 1
Joined: Wed Jul 29, 2009 3:50 pm

best way to save a template

Post by rubenhan »

Hi,

I'm trying to let the users create a template that they would like to use. They can add more input fields, customize the input fields, etc. Then, they would save the template, and later on, if they need it they would load it back. Actually the ending result would be pretty simple. Two input fields will be created as a set. But the user will be able to manipulate how many of those sets will be there and the values in those sets.

My question is

How do I save this template? Right now, I'm thinking of just getting all the necessary codes and just save them in the Mysql text and then load them back. (i.e. from div0 to div10). Would this be a good idea? If it is, how can I specify a specific segment of the html codes that the php separate from the whole html or php document and save it in the MYSQL text field?

If it's not a good idea to employ such method when it comes to saving a template, what other ways could I use?
Post Reply