The first day to get PHP, crashes, this all error?

Source: Internet
Author: User
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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.