Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to undefined method CI_Loader::post() Help me please..!!
#1

[eluser]Unknown[/eluser]
Help Me please it's display this error after click on submit
"Fatal error: Call to undefined method CI_Loader::post() in C:\AppServ\www\codeIgniter\application\controllers\welcome1b.php on line 42" and i don't know how to fix it. Thanks You

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

class welcome1b extends CI_Controller {
function __construct()
{
  parent::__construct();
  $this->load->helper(array('url','captcha','form','html'));
  $this->load->library('session');
  $this->load->model('Captcha_model','Captcha');
}
function login()
{
  $attr = array(
      'img_path'   => './captcha/',
      'img_url'   => base_url().'captcha/',
      'img_width'  => 150,
      'img_height' => 30
     );
  $captcha = create_captcha($attr);
  $time  = $captcha['time'];
  $ip   = $this->input->ip_address();
  $word  = $captcha['word'];
  #insert
  $this->Captcha->_insert($time,$ip,$word);
  #create form
  echo $captcha['image'];
  echo "<br><br>";
  echo form_open('welcome1b/dologin');
  echo form_input('word');
  echo form_submit('act','Check');
  echo form_close();
  
}
function dologin()
{
   $act = $this->input->post('act');
   if(empty($act))
   {
    redirect('welcome1b/login');
   }else{
    $word = $this->load->post('word');
    $exp = time() - 7200;
    $ip = $this->input->ip_address();
    #check captcha word
    $result = $this->Captcha->_check($ip,$word,$exp);
    if($result)
    {
     echo "Data Correct";
    }
    else {
     {
      echo "Data incorrect";
     }
    }
   }
}
}
#2

[eluser]Ed Robindon[/eluser]
should
$word = $this->load->post('word');

be
$word = $this->input->post('word');?
#3

[eluser]Unknown[/eluser]
[quote author="Ed Robindon" date="1350698149"]should
$word = $this->load->post('word');

be
$word = $this->input->post('word');?[/quote]

oh haha Thank you Very much these code make me confuse haha Thanks so much sir




Theme © iAndrew 2016 - Forum software by © MyBB