Hi CBG,
Logical switches do not work like spoken words and it is easy to misunderstand them. What you really want to check is that if any one of d,c,o is yes, then error. But PHP is obeying your instructions by stopping when anyone of them is No. You need to switch the OR to an AND and it will catch the one Yes that is not allowed:
<?php
$p = "Yes"; //yes is different than Yes
$d = "No";
$c = "No";
$o = "No";
if ($p === "Yes" && $d !== "Yes" && $c !== "Yes" && $o !== "Yes") {
echo "error";
exit;
} echo 'no errors';
?>
which will display an error if all three (d,c,o) are No. Otherwise, the code will display no errors.
but what are you doing when a lowercase y is used? yes instead of Yes. maybe you should also use lowercase and compare with strtolower().