[Solved] php if elseif statement select wrong variable every time [closed]


You have to write

if($_POST['postnummer'] == "7900" || $_POST['postnummer'] == "7950" || $_POST['postnummer'] == "7960") {
    $region = "Nordjylland";
}
elseif ($_POST['postnummer'] == "8654" || $_POST['postnummer'] == "8660" || $_POST['postnummer'] == "8680" || $_POST['postnummer'] == "8700") {
        $region = "Midtjylland";
}

solved php if elseif statement select wrong variable every time [closed]