CSS 数据库 mysql 到 PHP 上的 href

CSS href on database mysql through PHP

一个菜鸟问题,:) 我将创建一些 css 并且我希望 css href 位于数据库中。 这样当特定用户登录时,数据库上的 href 标记将被 PHP 调用并加载。

<link href="styles/admin.css" rel="stylesheet" type="text/css"/>

可能吗?例如:

mysqli database
username : Admin cssstyle : admin.css
username : John  cssstyle : user.css
<?php $result['username']='Admin';
if($result['username']=='Admin')
$cssPath='styles/admin.css';
else
$cssPath='styles/user.css';
?>
<link href="<?php echo $cssPath;?>" rel="stylesheet" type="text/css"/>

where the $result is database result array obtain from database