Multiple Websites - Same Template

Scenario: 100 customers need a website. I want to create 10 templates. Each customer will choose a template. Data will be served using PHP/MySql.

Things to consider:

Each customer needs their own domain name
No CMS such as WordPress
Not sure how one template can be used on multiple domain names

I need help brainstorming a solution as well as issues that may arise. I want to maintain 10 templates and have the appropriate template applied to each customer. I have the coding skills, I just need help with the logic.

I'm basically building one CMS that will be used by 100 different customers, each customer having their choice of 10 layouts.
LVL 16
rbudjAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Each domain name will have access to a data base, right?  You might store the template pointers in the data base, associating them with the URL, which you can find in $_SERVER['HTTP_HOST'].  If you store the templates in the file system in the form of HEREDOC blocks, your PHP script will prepare the variables that go into the HEREDOC, then require() the template file.  The last line of the template file can be echo, and, voila, your page is built and sent by the require() statement.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason C. LevineNo oneCommented:
Clever...
0
rbudjAuthor Commented:
Thank you for the reply. I will be looking into your solution this week and will report back. I do use cPanel for hosting. I hope this will not pose an issue.
0
rbudjAuthor Commented:
I have not yet had a chance to test your solution, however do to the experts levels and clever comment, I can assume it will work when I'm ready. Thank you for the replies.
0
Ray PaseurCommented:
Thanks for the points and good luck with your project, ~Ray
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.