tags:

views:

347

answers:

1

Hi, I am using cakephp for form designing application.

 In my code

  <?php echo $html->link('Delete', array('action' => 'deleteForm', 'id' => $r['Form']['id']), null, 'Are you sure?' )?>

In my controller

   function deleteForm($id = null)
    {

          $this->Form->del($id);
          $this->Session->setFlash('Your entry has been deleted.');

           $this->redirect(array('action'=>'homepage'));


    }

In my deleteForm.ctp file i kept a back link only..

The Form is deleted and the Flash message came.But showing an error of forms/deleteForm/1 is not found in this SERVER.

Edit: The error is because i have saved the view file as deleteForm.ctp instead of delete_form.ctp Now it works. Thanks for everyone..

+2  A: 

This is your second very basic question about PHP and CakePHP, might I suggest you to read the respective documentation?

And just to point you in the right direction, here is the documentation for AppController::redirect():

Please read the documentation before posting simple questions which would be answered by a quick peek.

Andrew Moore
This code i did is from the Site That you gave only..I have done with the sample posts ..Now only i m getting the errors
Aruna