• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.