Re: related to Session->setFlash

2009-08-27 Thread cbhan

Sorry for the late reply.Yes, you are right, if you are doing it in
views/layouts/default.ctp

On Aug 21, 6:53 am, kdubya  wrote:
> On Aug 19, 9:01 am, zaboo  wrote:
>
> > Don't echo $this->Session->setFlash()
>
> > On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > > I always get the digit 1 in the next line of the message sent through
> > > Session->setFlash from controller, need help
>
> I don't understand this answer. I have been having the same problem
> (the number 1 being displayed on the line after the flash message).
> Here is the code snippet from my controller:
>
>   function edit($id = null) {
>     $this->set('schema', $this->Item->_schema);
>     if (!$id && empty($this->data)) {
>       $this->Session->setFlash(__('Invalid Item', true));
>       $this->redirect(array('action'=>'index'));
>     }
>
> And here is the code from the view:
>
> flash();?>
>
> Are you saying that in the view the code should be:
>
> flash();?>
>
> Is that correct?
>
> Thanks,
> Ken
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-19 Thread cbhan

thanks a lot for  helping.

On Aug 19, 6:01 pm, zaboo  wrote:
> Don't echo $this->Session->setFlash()
>
> On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > I always get the digit 1 in the next line of the message sent through
> > Session->setFlash from controller, need help
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-19 Thread cbhan

Yes, i was doing exactly the same,in views/layouts/default.ctp file of
my application.thanks a lot for help

On Aug 19, 7:02 pm, Marcelo Andrade  wrote:
> On Wed, Aug 19, 2009 at 9:27 AM, Chander Bhan wrote:
>
> > I always get the digit 1 in the next line of the message sent through
> > Session->setFlash from controller, need help
>
> Are you echoing the Session->setFlash() call from the controller?
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> http://mfandrade.wordpress.com
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: $_POST

2009-07-16 Thread cbhan

As you know Cake is MVC framework , simply you can access the data
posted from your view(your form),in the controller's method with the
following:
say the function name is mario then,
function mario()
{
   if(!empty($this->data)){
$mariodata=$this->data;
   $this->set('yourdata',$mariodata);
}
},
Now in your mario.ctp file,which is the view file of this action
(method rather) from where you had posted your data type the following
code

this will solve your problem. If not i will continue to help .

On Jul 16, 4:57 am, mario vallejo  wrote:
> Hello and thank you for your time and attention. I am building a
> Facebook app and I want to use CakePHP to build it. The problem is the
> following
>
> I have tried to translate this into cake to no avail:
>
> $is_tab = isset($_POST['fb_sig_in_profile_tab']);
>
> if( !$is_tab ) $user = $fb->require_login();
>
> And that's really the only thing left in order to finish my app. I
> have got no clue on how to access 'normal' $_POST data inside of cake.
> Thank you very much and I really appreciate this.
>
> Mario R. Vallejo
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: FREE CakePHP e-book by Matt Curry

2009-05-14 Thread cbhan

Congrats ,for the great job, can you please provide me the link of
this e-book

On May 14, 1:05 pm, Nate  wrote:
> Hey everyone,
>
> Matt Curry (of CakePHP Digest fame) has just published a *free* e-book
> on advanced development techniques with CakePHP.  If you're already a
> seasoned Cake developer, this book will help you pick up many new
> tricks and best-practice solutions, as well as highlighting many
> little-known framework features.
>
> Read all about it 
> here:http://www.pseudocoder.com/archives/2009/05/13/free-cakephp-e-book-su...
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: notEmpty rule is not responding.

2009-05-13 Thread cbhan

Thanks arif ,but i think VALID_NOT_EMPTY,is deprecated in Cake12, i
made use of it ealier but same result..

On May 13, 3:44 pm, arif hossen  wrote:
> Please apply this code for your problem slove.
>
> var $validate = array(
>     'name' => array(
>          'rule' => VALID_NOT_EMPTY,
>          'allowEmpty' =>false,
>          'required' => true,
>          'message'=>'Name field can not be empty.'
>     )
> );
>
>
>
> On Wed, May 13, 2009 at 3:53 PM, cbhan  wrote:
>
> > I am using cake_1.2.2.8120 ,notEmpty rule is not responding.
> > // model code:
> > var $validate = array(
> >     'name' => array(
> >          'rule' => 'notEmpty',
> >          'required' => true,
> >          'message'=>'Name field can not be empty.'
> >     )
> > );
>
> > //view code
> >  > /**
> >  * Class and Function List:
> >  * Function list:
> >  * Classes list:
> >  */
> > echo $form->create(array(
> >        'enctype' => 'multipart/form-data'
> > )); ?>
> > 
>
> > 
> > Organization Name*
> > input('name', array(
> >        'label' =>''
> >    )); ?>
> >  ...and so no
> > Please help!
>
> --
> Regards,
> Mohammad Arif Hossen
> Junior Web Developer
> United Group International(UGIBD)
> Mobile: +88 01714355911
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



notEmpty rule is not responding.

2009-05-13 Thread cbhan

I am using cake_1.2.2.8120 ,notEmpty rule is not responding.
// model code:
var $validate = array(
 'name' => array(
  'rule' => 'notEmpty',
  'required' => true,
  'message'=>'Name field can not be empty.'
 )
);

//view code
create(array(
'enctype' => 'multipart/form-data'
)); ?>



Organization Name*
input('name', array(
'label' =>''
)); ?>
 ...and so no
Please help!

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---