I could use in_array but I tried this instead,
$_POST['stat'] == ('strength' || 'speed' || 'agility' || 'endurance')
The reason being is I decided to turn on E_ALL, my original if being,
if (isset($_GET['workout'], $_POST['stat']) && $_POST['stat'] == 'strength' || $_POST['stat'] == 'speed' || $_POST['stat'] == 'agility' || $_POST['stat'] == 'endurance')
But I got 3 notices for undefined variable stat even though I tested it with isset?
You can’t “or” strings like that:
You’d need to use
in_array()for this to work: