Welcome Guest, Not a member yet? Register   Sign In
form being skipped when I run controller
#1

[eluser]bill19[/eluser]
Hi everyone,

I have a preexisting form that I'm trying to use to collect some data. It seems that my controller bypasses my form completely and the $_POST array is never set. Finally at the end of the script the form appears. Obviously the sequence is wrong. How can I get the order right?

Thanks in advance,

KC



Here is my controller:

Code:
public function index()
{
  $this->load->view('addlisting'); // PREEXISTING FORM
                $this->load->model('newform');
                
                if (isset ($_POST)) {
                
                $this->newform->index();
                
                }
}

here is the model:

Code:
function index() {
        
      
        var_dump($_POST);  

}
#2

[eluser]boltsabre[/eluser]
Check out the documentation, you're missing lots of things by the look of it
http://ellislab.com/codeigniter/user-gui...ation.html
#3

[eluser]bill19[/eluser]
I have looked at that , but I'll check it out again




Theme © iAndrew 2016 - Forum software by © MyBB