My code is :
public function join_membership()
{
$this->layout = 'colorbox';
$membership_id = $this->Cookie->read('membership_id');
$membership = $this->Membership->find('first', array('conditions'=>array('Membership.id'=>$membership_id)));
$this->set('membership',$membership);
if($this->request->is('post'))
{
if($this->JoinMembership->save($this->request->data['JoinMembership']))
{
$this->redirect(array('action' => 'member_login'));
}
}
}
This code save the data in database properly but after that it displays blank page, it doesn’t redirect to the given function.
Thanks in advance….
Try with the following code into your if condition.
You can also try to print something into
if conditionyou used. Also use the else part and also print something intoelse part. Check it in debug mode 2.