@cameron_walter
To redirect with multiple variables in CodeIgniter, you need to pass the variables as parameters in the redirect URL.
Here is an example of how to redirect with multiple variables:
1 2 3 |
$data1 = 'value1'; $data2 = 'value2'; $data3 = 'value3'; |
1
|
redirect('controller/method/'.$data1.'/'.$data2.'/'.$data3); |
1 2 3 4 |
public function method($var1, $var2, $var3){ // Use the $var1, $var2, $var3 variables here // Redirected URL: controller/method/value1/value2/value3 } |
Make sure to replace controller
with the actual name of your controller and method
with the actual name of your target method.
Note: If any of the variables contain special characters, you should use the urlencode()
function to properly encode them before concatenating to the URL.