• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undefined property: App\Controllers\Signup::$input

#1
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;

  } 

}

}

?>
Reply

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

https://codeigniter.com/user_guide/incom...ving-input

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

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

https://codeigniter.com/user_guide/incom...ving-input

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


Thanks bro..
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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