I have a Controller with a method that accepts 2 parameters a username and a password like the following :
class Test extends CI_Controller {
public function index($username= NULL, $password = NULL){
if($username === NULL){
echo "Error";
}else if($password === NULL){
echo "Error";
}else{
echo "Your username is :"$username." and your password is :".$password;
}
}
}
in the route file I'm doing:
$route['Upload/(:any)'] = "Test/index/$1";
$route['Upload/(:any)/(:any)'] = "Test/index/$1/$2";
and in config file :
$config['permitted_uri_chars'] = '';
The url looks like: mysite.com/Test/mike123/rtO;"*skj
The issue I'm facing is that the password can contain a slashes that can make the url like below and break it:
mysite.com/Test/mike123/rtO;"*//skj
The url must be run like : mysite.com/Test/param1/param2 I do not want to url encode it. Is there any solution to run the url and get the parameters as mike123 and rtO;"*//skj
Thanks
url_encodeandurl_decode