...
<head>
<link href="css/common.css" rel="stylesheet">
<?php if($user['color_scheme']): ?>
<link id="themelink" href="css/<?=$user['color_scheme']?>.css" rel="stylesheet">
<?php else: ?>
<link href="css/default.css" rel="stylesheet">
<?php endif; ?>
</head>
...
<input type="radio" value="theme1" name="theme">
<input type="radio" value="theme2" name="theme">
var themelink = $('#themelink')
$('input[name="theme"]').on('change', function(){
var theme = this.value;
themelink.attr('href', 'css/'+theme+'.css');
$.post('/some/server/path',{theme:theme}).then(function(response){
console.log('theme has been changed');
})
});