scenario: my users have their own profile pages with different background colors and fonts, I want to retrieve the colors for example from a certain user using ajax. i.e.
$.ajax({
type: "POST",
data: "id",
url: "ajax/css.php",
success: function (bg,font) {
$('#bg').css('background-color', 'bg');
$('#font').css('font-color', 'font');
}
ajax/css.php page
<?php
//retrieve the background and font data from database for the id(userID).
// this is the bit I'm stuck here, shall I echo the results or return them :~
?>