CodeIgniter Forums

Full Version: form being skipped when I run controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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);  

}

El Forum

[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

El Forum

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