因此,当用户选择表单中的下拉框到另一个表单时,我试图使样式表发生变化。
我的代码如下。
$styles = array(
"style",
"dark"
);
$style = $_POST["style"];
if (!in_array($style, $styles))
{
//we default back to the first in the array, this prevents accidental hardcoding;
$style = $styles[0];
}
$css =