I'd like to build a website where users could log in and change the theme and the positions of elements of the website. So basically they can add/remove/move/change color elements on the site. After they save the settings, they come back with the same login and find the site is as they left it.
So my question is: Whats the most practical way to do this? Saving all data to MySQL and loading it back when the visitor logs in? Using PHP to make new PHP files?
If I where to save to MySQL, how do I handle < > ; ' -
? Put them all into their own column?
I do pretty much the same by writing all settings to my MySQL database, but I just have a few settings for each user and I only save those which are different from the default. Probably you could do the same with cookies, but this would not depend on the user (except you delete those cookies at logout). What I also do is to save the settings when changed via js & php, there is no save button to be clicked.