Welcome Guest, Not a member yet? Register   Sign In
Data pass from one function to another in same controller?
#4

[eluser]anis2505[/eluser]
Try this.

Quote:Controller
Code:
public function Login()
{
  if($_POST) {
   $logindata=array(
     'emailpost'=>$_POST['email'],
     'passwordpost'=>$_POST['password']
   );
  
   $login_confirm=$this->systemModel->loginManagement($logindata);
  
            $emailgot=$this->systemModel->getEmail($logindata);
            $data['emailgot']=$emailgotvalue;
  
   if($login_confirm){
    $this->user($data);
    return;
   }
  }
  $this->load->view('header');
  $this->load->view('userLogIn');
  $this->load->view('footer');
}


public function user($data=array())
{
  $this->load->view('header');
  
  
  $data['emailgot'];
    

  $this->load->view('user',$data);
  $this->load->view('footer');
}

Quote:View

Code:
<?php echo form_input(array('name'=>'email','readonly'=>'true','value'=>$emailgot));?>


Messages In This Thread
Data pass from one function to another in same controller? - by El Forum - 06-30-2013, 04:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB