Disallowed Key Characters |
[eluser]Peter Lubambi[/eluser]
Hi all, I am new to codeigniter. I always get this error 'Disallowed Key Characters' whenever I try to submit my form to save into the database. I have tried some solutions from net like deleting my cookies history but still I get the error.... any idea on how to get rid of this. thanks in advance.
[eluser]toopay[/eluser]
are you using the closing '?>' at controller or model? If yes, remove any of that (and whitespace after your very end line)
[eluser]ClaudioX[/eluser]
Look if you're trying send a url with disallowed characters. for exemplo: "http://www.myurl.com/send_form/values/@>*&morethings;"
[eluser]osci[/eluser]
in application/config.php Code: /* you can permit more characters there but watch for DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
[eluser]toopay[/eluser]
@Claudio & osci, there is nothing to do with character beeing send in browser addressbar or 'config['permitted_uri_chars']. This error ussually means one thing : an extra line break. The line feed (LF) and carriage return (CR) characters (and their hex code equivalents ( and ) are forbidden in CodeIgniter’s framework.
[eluser]toopay[/eluser]
their hex code equivalents Code: ( and
[eluser]InsiteFX[/eluser]
Take a look at the system/core/Input.php class and _clean_input_keys($str) InsiteFX
[eluser]toopay[/eluser]
if you send disallowed character in the browser address bar, it should generate an error like.. Quote:An Error Was Encountered 'Disallowed Key Characters', an error which Peter face with, more probably because an extra line break OR... its generated by '_clean_input_key()' function in CodeIgniter Input Class (which means Peter send disallowed character in $_GET or $_POST variable, not URI), and as i stated above, there is nothing to do with character beeing send in browser addressbar or 'config['permitted_uri_chars'].
[eluser]Peter Lubambi[/eluser]
Thanks everyone, it's true that I was sending disallowed characters on the smile, see these lines $fname=array('name'=>'fname','id'=>'fname','type'=>'text'); echo "<p>First Name: ".form_input('$fname' nake: )."</p><br />"; was supposed to be echo "<p>First Name: ".form_input($fname)."</p><br />"; |
Welcome Guest, Not a member yet? Register Sign In |