if(isset($_GET['a'] or $_GET['b'])){
echo "ok";
}else{
echo "no";
}
i have two var for one condition when isset $_GET['a'] or $_GET['b']
always echo ok either echo no
if(isset($_GET['a'] or $_GET['b'])){
echo "ok";
}else{
echo "no";
}
i have two var for one condition when isset $_GET['a'] or $_GET['b']
always echo ok either echo no
isset takes only one input not two
it should be
if(isset($_GET['a']) OR isset($_GET['b']))
{
echo 'ok';
}
else
{
echo 'nope';
}
© 2022 - 2024 — McMap. All rights reserved.
isset(…) or isset(…)
– Shameisset(a) || isset(b)
– Schafer