S.M_Emamian
S.M_Emamian

Reputation: 17393

$_POST not work in codeigniter

my login form is:

http://www.khabgahfeiz.ir/admin/login

in my controller:

    public function handling() {

        var_dump($_POST['email']);
        return;
....

but it return null value and I got this error:

Severity: Notice

Message: Undefined index: email

Filename: backend/login.php

Line Number: 29

Upvotes: 0

Views: 84

Answers (4)

S.M_Emamian
S.M_Emamian

Reputation: 17393

I changed it :

 $config['base_url']    = 'http://khabgahfeiz.ir/';

to :

$config['base_url'] = 'http://www.khabgahfeiz.ir/';

Upvotes: 0

Alamgir Hussain
Alamgir Hussain

Reputation: 26

For Input All Post $data=$this->input->post(); **And For Single post* $name=$this->input->post('name');

Upvotes: 0

Rajen Antarkar
Rajen Antarkar

Reputation: 162

Use like this in your controller

echo $this->input->post('email');

Upvotes: 0

Virb
Virb

Reputation: 1578

Use $this->input->post(). For e.g.:

$this->input->post('table field'=>'form element name');

Upvotes: 1

Related Questions