The first day to make PHP, crashed, this all error???
if ($_get[' all ']== ' yes ')
{
echo "HI";
}
Error: notice:undefined Index:all in C:\Users\Administrator\Downloads\PHPnow-1.5.6.4237493736\htdocs\oa\manage.php on Line 71
Little brother is not clear, what is the difference between an equal sign and two equals sign.
In addition, if you change to an equal sign, no error, but this statement is not used, the URL above the All=yes will appear hi, the URL does not all=yes or will appear hi.
------Solution--------------------
if (Isset ($_get[' All ") && $_get[' all ']== ' yes ')
{
echo "HI";
}
------Solution--------------------
$_get[' All ' is undefined, not an error, just a hint.
You can use the Isset () method to determine if a value has been defined.
For example:
if (Isset ($_get[' All ") && $_get[' all ']== ' yes ')
{
echo "HI";
}
------Solution--------------------
An equal sign is a value assignment
Two equals equals
The correct wording should be judged first with isset.