Location: PHPKode > projects > Mozart > Mozart-0.0.4/userprefs.inc
<?
// called from: every program which present a screen to the user
// description: retrieves user preferences from USERS
//
$UserDataSQL = "SELECT gmail, bgcolor, txtcolor, bordercolor, admin, first, last, email FROM users, contact WHERE user_id = contact_id AND user_id = '$UserID'";
$UserData    = mysql_query($UserDataSQL,$db);
$userdata    = mysql_fetch_array($UserData,$db);

$errno       = mysql_errno($db);
$errmsg      = mysql_error($db);

if (!($errno == 0)) {
    $Message = "$errno: $errmsg";
    print("$Message");
    exit;
}
// $LastName    = $userdata["last"];
// $FirstName   = $userdata["first"];
$Gmail       = $userdata["gmail"];
$Admin       = $userdata["admin"];
$bgcolor     = $userdata["bgcolor"];
$txtcolor    = $userdata["txtcolor"];
$bordercolor = $userdata["bordercolor"];
?>
Return current item: Mozart