How To Solve Disallowed Key Characters Error In Codeigniter?

I was trying to implement jQuery AJAX form data serialize using Codeigniter and getting error "Disallowed Key Characters". This error bugged me for hours.

I opened the system/codeigniter/system/core/input.php file:
Find the function _clean_input_keys($str)

Change:

exit('Disallowed Key Characters.');

to:

  exit('Disallowed Key Characters.'. $str);

It will tell you what characters are causing this error or problem. The problem was naming of the input field. I named input field as

<input type="text" name="myarray['data1']" \>

And I just changed the input's name.

<input type="text" name="myarray[data1]" \>


And it worked. :)

Comments

Post a Comment

Popular Posts