I want to check if either of these checkboxes are checked and if either of them are i want the new assigned variable $open_monday to = "yes else "no".
if (isset($_POST['open_monday_lunch'] or $_POST['opening_monday1'])) {
$open_monday = "yes";
}
else { $open_monday = "no"; }
Is that the right way to do it? I have never used or before. I just get a blank pag when trying to run it as if the syntax is incorrect.
isset($_POST['open_monday_lunch']) || isset($_POST['opening_monday1']))You don't use it in the function call itselfif ( isset($_POST['open_monday_lunch']) or isset($_POST['opening_monday1']) ) {regardless of whether you use||orORBut you should also read this answer before moving from using '&&' and '||' toANDandORstackoverflow.com/questions/2803321/and-vs-as-operator