I want to check many values if are set at the same time. I read from the isset documentation that says If multiple parameters are supplied then isset() will return TRUE only if all of the parameters are set. Evaluation goes from left to right and stops as soon as an unset variable is encountered.
So why does my code always print the values sent and never prints 'no'?
PHP
if ( isset( $_POST['thread'],
$_POST['winkey'],
$_POST['dkey'],
$_POST['winrew'],
$_POST['drew'] )===true ) {
echo $_POST['thread'];
echo $_POST['winkey'];
echo $_POST['dkey'];
echo $_POST['winrew'];
echo $_POST['drew'];
}
else echo 'no';
HTML
<form action="class.php" method="POST">
thread link:<br>
<input type="text" name="thread" >
<br>
win key:<br>
<input type="text" name="winkey" >
<br>
double key:<br>
<input type="text" name="dkey" >
<br>
winrew:<br>
<input type="text" name="winrew" >
<br>
double rew:<br>
<input type="text" name="drew" >
<br>
<input type="checkbox" name="banlist" value="ban">Include banlist<br>
<br>
<input type="submit" value="Submit">
</form>