Welcome Guest, Not a member yet? Register   Sign In
making a form to work
#2

[eluser]entropy[/eluser]
I found the solution. The form code must be placed in a view that is loaded by the controller.

controller:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Register extends CI_Controller {

   public function index() {
     $this->load->view('top');
     $this->load->view('register');
     $this->load->view('end');
   }
}

?>

view:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
     $this->load->helper('form');
     echo form_open('register/confirm');
     $data = array(
              'name'        => 'username',
              'id'          => 'username',
              'value'       => '',
              'maxlength'   => '40',
              'size'        => '40'
            );
     echo form_input($data);
?>


Messages In This Thread
making a form to work - by El Forum - 10-17-2012, 09:17 AM
making a form to work - by El Forum - 10-17-2012, 09:26 AM
making a form to work - by El Forum - 10-17-2012, 09:51 AM
making a form to work - by El Forum - 10-17-2012, 04:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB