Welcome Guest, Not a member yet? Register   Sign In
Disallowed Key Characters
#1

I know this is not a new topic but I was not successful in researching prior posts for a solution so I will start fresh!!
I am using CodeIgniter v 2.2.0, PHP 5.5.12 and these programs have worked before I decided to implement csrf functionality.
I set line 295 $config['csrf_protection'] = true; was "false".  I made no other changes to the config file.
I am using the examples provided by kodingmadesimple.com to incorporate CodeIgniter + Bootstrap (3) + jQueryUI as the method to incorporate form_open, form_close and flashdata to get csrf functionality and keep my HTML + Bootstrap 3 code.
When I try to Update or Add a record I receive a "Disallowed Key Character"!!
I have attached the portion of the api.php controller for the function person, the person_model.php as well as the personAdd_view.php and personUpdate_view.php for your review.
Thank you for your time and effort on my behalf.
John K
PS:  I have also enclosed the header_view.php as it contains the various links, navbar, etc.
.php   persons.php (Size: 10.94 KB / Downloads: 131)

Attached Files
.php   header_view.php (Size: 8.34 KB / Downloads: 133)
.php   personUpdate_view.php (Size: 4.26 KB / Downloads: 194)
.php   personAdd_view.php (Size: 3.47 KB / Downloads: 149)
.php   person_model.php (Size: 1.4 KB / Downloads: 143)
Reply
#2

I love it when I shoot myself in the foot!
Call it Irish Determination (otherwise known as Stubbornness!!) but I followed the example in the CI Docs for adding "features" to the Core by creating MY_Input.php and adding .$str to the end of line 33 within the parentheses and voila up popped the error program and a less than meaningful string "-?>" which after much looking pointed to line 28 of the personUpdate_view.php program, I had "echo form_open("<?php echo $action;?>", $attributes); ?>" and it should have been "echo form_open($action, $attributes); ?>"!!
Gets me the Dummy Award for the week and I hate to think of the time I spent on this error!!
I would like to see an enhancement to the core/Input Class to make this change permanent.
It will help greatly and researching the web the problem does seem to come up frequently.
Thanks. John K
Reply




Theme © iAndrew 2016 - Forum software by © MyBB