I did the following

<?php $archives = $this->requestAction('archives/index/'.$username); ?
>

and then in the controller

<?php
class ArchivesController extends AppController {
    var $name = 'archives';

        //echo $username;
    function index($username) {
        $archives = $this->Archive->findByUser($username);
        if(isset($this->params['requested'])) {
             return $archives;
        }
        $this->set('archives', $archives);
    }
}
?>

And I get this error:


Warning: Missing argument 1 for ArchivesController::index() in C:
\Program Files\xampp\htdocs\cake\app\controllers
\archives_controller.php on line 5

Notice: Undefined variable: username in C:\Program Files\xampp\htdocs
\cake\app\controllers\archives_controller.php on line 6


On Dec 14, 2:17 pm, jarmstrong <[EMAIL PROTECTED]> wrote:
> You can get away with just adding the arguments after the function name using
> slashes to split each argument.
>
> You can do something like this:
>
> <?php $archives = $this->requestAction('archives/index/'.$i_love_Cake); ?>
>
> --
> View this message in 
> context:http://www.nabble.com/RequestAction-parameters-tp14339603p14339776.html
> Sent from the CakePHP mailing list archive at Nabble.com.

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

Reply via email to