开发者

php data checking and clarification

if( isset( $_POST['aquafina'] ) && $_POST['aquafina'] != '' ) 
{
    $message .= "AquafinA: ".( $_POST['aquafina'] ). "\n";
} 

Noob, questions and clarifications:

This means != (not equal to empty), right?

And

if( isset( $_POST['numSelections'] ) &开发者_StackOverflow中文版amp;& $_POST['numSelections'] > 0 &&

$_POST['numSelections'] < 40 ) 

This means less than 40 for numSelections, right?

Just need some clarification, thank you for not flaming.


!= ''

This is not equal to the empty string, yes. I recommend looking at the type comparison table.

And the second one will mean if numSelections is

  • a set variable and
  • larger than 0 and
  • smaller than 40


$_POST['aquafina'] != '' means not equal to empty string.

and yes, less than 40, if $_POST['numSelections'] is numeric.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜