Welcome Guest, Not a member yet? Register   Sign In
if an input have accents it send a empty values in CI 2
#1

[eluser]Unknown[/eluser]
First of all, sorry for my english it´s not pretty good.
I´m going crazy. With CI2 when i´m trying to send values with accent or ñ in a form, the value become empty. This is not a problem of page encoding and only happends with CodeIgniter 2 (with previous versions it´s all ok).
For example, in the view:

Code:
<?php $attributes = array('class' => ''); ?>
<?= form_open('welcome/test8', $attributes); ?>
<input type="text" name="test" id="test" />
<input type="submit" />
</form>

And in the controller a function that just print the value of test:

Code:
function test8()
{
  echo $this->input->post('surname');
}

If you fill the input with "Sanchez" and send the form, all ok, it prints "Sanchez".
But if you fill "Sánchez" with accent, the value goes empty from the form and nothing prints.

Simply the bug send a empty value when you fill the form with accents or eñes.

Anybody can help me?
Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB