Why are you attempting to do that?

!empty() checks to make sure the POST data exists, empty() checks to
make sure the POST data is empty.

On Jan 7, 9:10 am, zer0_gravity <zr...@hotmail.com> wrote:
> function add(){
>         if(!empty($this->data)){   ///why does this statement works
>               ///      if(empty($this->data)){ why does this statement
> do nothing
>                 if($this->Post->save($this->data)){
>                 $this->Session->setFlash('Your post has been saved.');
>                 $this->redirect(array('action' => 'index'));
>                 }
>
>         }
>  }

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to