accented with $this->input->post |
[eluser]cmarra[/eluser]
Hello everyone, I have a small problem with $this->input->post('title'); Basically I cut blah accented letters typed by the user ... I try to explain better: $Title = $this->input->post('title'); I would need to clean the string received from the form ... I tried to replace accented letters with those with normal str_replace but seems to work ... How do I replace for example a, and with it etc etc? Thanks
[eluser]Clooner[/eluser]
[quote author="cmarra" date="1275934214"]Hello everyone, I have a small problem with $this->input->post('title'); Basically I cut blah accented letters typed by the user ... I try to explain better: $Title = $this->input->post('title'); I would need to clean the string received from the form ... I tried to replace accented letters with those with normal str_replace but seems to work ... How do I replace for example a, and with it etc etc? Thanks[/quote] from our friend google Code: function removeaccents($string)
[eluser]Clooner[/eluser]
http://www.php.net/manual/en/function.strtr.php has some more on this
[eluser]cmarra[/eluser]
ehm thank you but I already tried this function and still does not work ... ie if the function I pass the word so removeaccents (will) WORKS! but if I do so: $ Title = $ this-> input-> post ('title'); removeaccents ("$ title") THAT DOES NOT WORK! I think the problem is just $ this-> input-> post ('title'); ....
[eluser]Clooner[/eluser]
[quote author="cmarra" date="1275936412"]ehm thank you but I already tried this function and still does not work ... ie if the function I pass the word so removeaccents (will) WORKS! but if I do so: $ Title = $ this-> input-> post ('title'); removeaccents ("$ title") THAT DOES NOT WORK! I think the problem is just $ this-> input-> post ('title'); ....[/quote] try Code: $title = removeaccents($title);
[eluser]Clooner[/eluser]
btw what does your profiler say on the post data? http://ellislab.com/codeigniter/user-gui...iling.html
[eluser]cmarra[/eluser]
now I'm working, just added aa house feel but what is the class Profiler?
[eluser]Clooner[/eluser]
[quote author="cmarra" date="1275936933"]now I'm working, just added aa house feel but what is the class Profiler?[/quote] I put a link to the profiler manual! I suggest you read it before asking questions!
[eluser]cmarra[/eluser]
I understand you but what should I expect from the POST variables after using the class?
[eluser]Clooner[/eluser]
[quote author="cmarra" date="1275937273"]I understand you but what should I expect from the POST variables after using the class?[/quote] First line from the manual: The Profiler Class will display benchmark results, queries you have run, and $_POST data at the bottom of your pages. This information can be useful during development in order to help with debugging and optimization. |
Welcome Guest, Not a member yet? Register Sign In |