With the redirect method, change the driver and view, but I want to change before sending a parameter, but I do not know how to receive it in the other controller, the data is sent by the url, but it is a rare thing that does not use the sign "?" but ":"
URL: link
Method that redirects to the other controller and sends the data (parameter, parameter1).
return $this->redirect(
array('controller' => 'Joshuas',
'action' => 'vista',
'parametro' => 'HolaUno',
'parametro2' => 'Holados')
);
they arrive at this class and thus try to receive parameters:
<?php
class JoshuasController extends AppController {
public function vista(){
$variable = $_GET['parametro'];
$variable1 = $_GET['parametro1'];
}
}
But I get this error
Notice (8): Undefined index: parametro [APP\Controller\JoshuasController.php, line 6]
Notice (8): Undefined index: parameter1 [APP \ Controller \ JoshuasController.php, line 7]