Hello readers,
If you are using cakephp and want to redirect user to any other page/controller with some passing values in url, Well cakephp provides you its own syntax written in php, check bellow example:
  $this->redirect(
        array(
              "controller" => "Controller", 
              "action" => "user",
              "?" => array(
                  "username" => "user123",
                  "usertype" => "staff"
              ) ),
        $status,
        $exit
    );
Here I want to pass username and usertype to my controller with values- user123 and staff.
Finally the url will be appear like this-
/Controller/user/?param1=val1¶m2=val2
                       
                    
0 Comment(s)