About

Breaking

Tuesday 9 May 2017

How to add pair delete function to my index


This code for index
<td><?php echo $this->Form->postlink('delete',array('controoler'=>'Users','action'=>
'delete',$user['User']['id'])); ?> </td>





controller 

public function delete($id){

$this->User->id = $id;
                 $this->request->is(array('post','put'));
 $this->User->delete();
   $this->redirect('index');






No comments:

Post a Comment