codeigniter - %20 is added instead of spaces -


i guess small issue yet had ask here since running short in project. when pass string function in controller, changes spaces %20 sign. guess controller thinks string passed url , encodes it. don't know how remove or if possible not let change spaces %20. here code use;

$message="the user name provided in our database"; redirect('admin/add_user/'.$message); 

here controller function receive message;

public function add_user($message) {   echo $message; } 

i tried as;

public function add_user() {   echo $this->uri->segment(3); } 

but result same. here output of string;

the%20user%20name%20you%20provided%20is%20already%20in%20our%20database 

try this:

public function add_user($message) {   echo urldecode($message); } 

you can read more urldecode here: http://php.net/manual/en/function.urldecode.php


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -