CodeIgniter Forums
Undefined property: App\Controllers\Signup::$input - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Undefined property: App\Controllers\Signup::$input (/thread-76869.html)



Undefined property: App\Controllers\Signup::$input - newbiecoder - 06-28-2020

Can't pass form data from view to SignUp controller. 

home.php
<?php

helper('form');

echo form_open('Signup');


echo form_input('user_email','',['placeholder'=>'Email Address'],'email');
echo form_input('user_password','',['placeholder'=>'Password'],'password');

echo form_submit('mysubmit','SignUp');
?>



Signup.php

<?php

namespace App\Controllers;

use CodeIgniter\Controller;


class Signup extends Controller
{


    public function index()
    {

if($this->input->post('mysubmit')!=NULL)
{

$mailids=$this->input->post('user_email');

      echo $mailids;

  } 

}

}

?>


RE: Undefined property: App\Controllers\Signup::$input - jreklund - 06-28-2020

That's CodeIgiter 3 code. You are using CodeIgniter 4 correct?

https://codeigniter.com/user_guide/incoming/incomingrequest.html#retrieving-input

$this->request->getPost('user_email');


RE: Undefined property: App\Controllers\Signup::$input - newbiecoder - 06-29-2020

(06-28-2020, 07:39 AM)jreklund Wrote: That's CodeIgiter 3 code. You are using CodeIgniter 4 correct?

https://codeigniter.com/user_guide/incoming/incomingrequest.html#retrieving-input

$this->request->getPost('user_email');


Thanks bro..