Initializing Jquery UI with a setup (localization, theme) taken from a database

Initializing Jquery UI with a setup (localization, theme) taken from a database

Hi. I'm the lead programmer for a CMS written in PHP and, as such, I have little knowledge of JavaScript.

In the last year I have gradually moved all of the JSs I do have to JQuery, in a conscious effort to get more stability and a better user interface. The last big move I have to do is with skins. Right now I have three themes of my own, more or less corresponding to different CSS files. In the preferences page, my user chooses one of those out of a select and I store her selection in my database, together with other info such as her favorite language, her password, etc. In every other page I use that info.

I have just passed two frustrating hours trying to understand how I can upgrade to JQuery UI for this. I have found plenty of examples where I can load and display the Themeroller widget. It does appear and lets the user choose a theme. But how do I put this choice in a form, so that the choice is submitted to the server and stored there? And when I've done that, what do I put the the subsequent pages' <head> so that the pages' widgets use the chosen theme?

Feel free to answer with a short, sharp oneliner, or a link to the correct documentation page, or a code example. And thanks in advance.