Form Error on Post |
[eluser]juggernautsei[/eluser]
I am trying to create a simple basic form that will post to itself. However when I click the submit button I get the An Error Was Encountered The asction you have requested is not allowed. I can't find anything in the documentation that would help me trouble shoot this code error. I was expecting just to simply have the form post and display what I put in the box. Action is left blank so that it post back to itself but I have also tried to put in echo base_url('index.php/childtest/search') and I still receive the same error message. Thanks for the help. controller Code Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); View Code: Code: <div id="search">
[eluser]joergy[/eluser]
The Error is typical for a failure due to "Cross-site request forgery (CSRF)". See Security Class for details. But I'm not sure if this is the reason. On a first glance I don't see an error but that one: echo $keyword; $this->load->view('childsearch'); You can't successfully load a view AFTER You've made some output with echo.
[eluser]juggernautsei[/eluser]
So I was doing some more research trying to find my particular error. I read this post on StackOverFlow.com http://stackoverflow.com/questions/20086...niter?rq=1 So I changed my controller code to this: Code: class ChildTest extends CI_Controller { So now I am calling the search function form the index method I believe and not directly. But I still get the same error message An Error Was Encountered The action you have requested is not allowed. Still trying to figure out what action is not allowed. Not a very descriptive error message. |
Welcome Guest, Not a member yet? Register Sign In |