That should be handled by the SELECT statement, not the PHP script.
'$wValue' is the literal string "$wValue", so the above line looks for '$wValue' in $classmin, which isn't set. Only put quotes around indices that are string literals, like $_POST['wClass']. In the above line, you'd want to...