Hi all,
When using setAction to redirect to another controller action, the
parameters are passed such that they can be retrieved via
<code>func_get_args()</code>.
Looks like this:
<code>
// the delete action should be redirected to the manage action
function delete($id = null)
{
$this->setAction('manage_employees', $deleted_employee);
//$this->redirect('employees/manage_employees');
}
// the parameter is read via func_get_args()
function manage_employees()
{
$args = func_get_args();
$delete_employee = $args[0];
}
</code>
Is there a better way to access the passed parameter in the action
manage_employees above - other than $args[0]?
Thanks,
Quang
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---