php - Passing values between Controllers and Views -


i working within person's project framework , lack of experience using mvc problematic. controller's index() passes value view via $data variable, view has urls trigger other functions in controller.

when 1 of these urls clicked, need value controller function being called. don't want pass in url , wondering if there other way so?

example controller function need pass value to:

public function ftp($request = null) {     $data['title'] = 'ftp';     $data['page'] = 'services';     \helpers\session::set('template', 'default');     if (!session::get('user'))     {         url::redirect('');     }     else     {         $data['request'] = $request;         $data['baseurl'] = '/site/'.$request.'/';         $this->view->render('site/ftp',$data);     } } 


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -