Question about php ifelse?

Source: Internet
Author: User
Php ifelse question ??? I am a newbie. today I am modifying a PHP source code because I want to use a PHP IFelse. I hope you can help me. Link. php? When idabc does not have abc, that is, when the id value is null, the system prompts that the parameter is incorrect. when the id value is not empty, the system executes link. php? How to write the idabc statement? ------ Solution -------------------- php if else question ???
I am a newbie. today I am modifying a PHP source code because I want to use a php if else. I hope you can help me.

Link. php? Id = abc when no abc is available, that is, if the value of id is null, the system prompts that the parameter is incorrect. if the value of id is not empty, link. php is executed? Id = abc

How to write this statement?

------ Solution --------------------
If (isset ($ _ GET ['id']) {
// Has an id

} Else {
// No id prompt code
}
------ Solution --------------------

PHP code
If (isset ($ _ GET ['id']) {// Has id} else {// No id prompt code}

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.