in my script im trying to get users to select their theme. this is my coding
function meta()
{
$usr = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM fun_members WHERE id='".$usr."'"));
if($theme)
{
$usertheme = "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0].css\" />";
}else{
$usertheme = "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
}
echo "$usertheme";
?>
when users select the theme it updates in the database this doesnt happen
$usertheme = "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0].css\" />";
can some1 tell me what i did wrong please