Why does my younger brother always prompt that the deletion fails? Where is the question? I hope you can help me with the following code:
Source: Internet
Author: User
Why does my deletion function always prompt that the deletion fails? Where is the question? I hope you can use the code functiondelete ($ id = null) {& nbsp; if (! $ Id) {& nbsp; $ this-& gt; Session-& gt; s why does my deletion function always prompt deletion failure? Where is the question? I hope you can help me with the following code:
Function delete ($ id = null ){
If (! $ Id ){
$ This-> Session-> setFlash ('invalid', true );
}
------ Solution --------------------
But it still enters the else branch. If you cannot delete the code, it indicates that there is a problem with the deletion code. $ This-> User-> del (); how is this function written?
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