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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -