Forum Moderators: open

Message Too Old, No Replies

Dynamically generating html and templates

         

mcqueen

9:09 am on Mar 5, 2003 (gmt 0)

10+ Year Member



Hi

I want to offer a link from my site to potential clients. I intend to offer the clients a small website allowing them to choose the site design from a number of templates. I intend to store all the client data in a database such as MySQL and to create their website dynamically from this data. I'm just exploring different ways of setting up a system like this and I'd appreciate any feedback or suggestions on developing such a system.

Thanks in advance.

wruk999

8:35 pm on Mar 5, 2003 (gmt 0)

10+ Year Member



hi,

Personally I would go the PHP [php.net] & MySQL route.
All you would have to do, is build a template, with each page being a PHP page. Then print in the places where you want the dynamic data to be.

To make things even easier, use a central "connection script" and have a "siteid" parameter in there.
Then in your site table in your database, have a siteid column, and then place in the connection page, a $siteid = number value.
all your select queries will then be..
"SELECT * FROM SitesTable WHERE 1 AND Siteid = $siteid"

This is how I would do it. Then for every new site you put up, you just change the one siteid value in the php connection page, and its done...quick..simple...effective!

Regards,
William.

jatar_k

8:42 pm on Mar 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld mcqueen,

You could get that working with out too many headaches, as wruk999 says. I have done some similar things before and they have been fairly straight forward. You will really have to layout before hand what options you want them to be able to configure.

The number of configurable options and the implementation of them in your templating scripts will govern how difficult it will be to create.

Nick_W

8:45 pm on Mar 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [webmasterworld.com]

To add to the above, a decent PHP Template System [smarty.php.net] would make life easier too...

Nick