• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI Form Help

Hey if anyone can help me out with my forms that would be great. I enabled error_logging all the way up to 4 and I don't see any errors and I'm completely clueless why it does not work.

class Something extends CI_Controller {
    public function __construct() {

    public function index() {
       $data['stuff'] = 'Content';
       $this->load->view('something', $data);

    public function results() {
       $data['stuff'] = $this->input->post('info');
       $this->load->view('something', $data);

<head><?=$stuff ?></head>
<?=form_open('something/results') ?>
<?=form_input('info', 'Info') ?>
<?=form_submit('submit', 'Submit!') ?>
<?=form_close() ?>
<?=$stuff ?>

It just hangs there. I'm not sure why but I'm wondering but I didn't include some JQuery code that is on my views page but that shouldn't affect it from working. There are no errors and the last line of my CodeIgniter error logs outputs

DEBUG - 2012-04-21 21:15:28 --> Helper loaded: text_helper
DEBUG - 2012-04-21 21:15:35 --> Final output sent to browser
DEBUG - 2012-04-21 21:15:35 --> Total execution time: .9838

So I'm at a complete loss, the only thing left I can think of is to use AJAX form handling instead of purely CodeIgniter. Am I missing something or do I have to use Jquery to process forms?

Hi - I just tried your code on a fresh install of Code Igniter. Your code worked fine for me. You might need to provide us more code for us to look and debug at.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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