Well, there are two methods you could go by this: store the colors for CSS in the database, or have the layout in HTML in the database, and replace the page.
Step one: make at least two layouts. Right now it should just be a test, so make only a few to work with. Make them fairly basic, as well. I suggest making a separate links file that you include into every template, so you only have to change that. That is, if you don't use MySQL for links.
Replace the parts in the file with the text you want, i.e., where you want the content in the page, write something like <content>, and then replace <content> with the content retrieved.
Very basic, I know, but it works. If you need more help, I'll be glad to offer it, and perhaps some examples of what I did. (I didn't use MySQL for holding the layouts, though.)