私がやろうとしているのは、SQLクエリの前に正しい変数を設定することです. これは私が作成したifステートメントですが、正しくエコーアウトすることはできません。以下の設定では、fnm をエコーアウトする必要がありますが、nm をエコーアウトしています。正しいデータを挿入できるように、各 if ステートメントで両方の変数を一致させるために、ここで間違って何をしていますか
$type = "No Notification";
$remote = "Yes";
if ($type == "No Notification" && $remote == "No"){
$type = "nm";
}
elseif ($type == "Email Notification" && $remote == "No"){
$type = "m";
}
elseif ($type == "No Notifcation" && $remote == "Yes"){
$type = "fnm";
}
elseif ($type == "Email Notification" && $remote == "Yes"){
$type = "fm";
}
else {
$type = "nm";
}
echo $type;