Try adding single quotes around the variable name:


"SELECT `professional` FROM users WHERE `sub_domain` = '$prac_dir'";

Just a quick suggestion, try it and see, good luck :)

Edit: You...