echo $_POST['f_id'];
?>
You didn’t write this together, did you? ? This only works if the form is submitted. Your form here has no action address and no submit button. How do you want it to be obtained?
<form action="test.php" method="post"><select name="f_id"><option value="0">添加大类</option><option value="1">添加小类</option></select><input type = "submit" value = "apply" /></form>