I want to pass data from one function to another function in same controller.And then show that data on a view.This is my code parts.But it gives errors in view.Please can you help me?


function getEmail($logindata)
  return $emailentered;


public function Login()

  if($_POST) {






public function user($data=array())




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

Shouldn't line 15 be:

$data['emailgot'] = $emailgot;

What is the error you get?

@ pritaeas:Thanks for your reply.Finally solved it.The mistake was in the Model :) Anyway thansk again

And i'm asking a small question although it's not relevant to this topic.I want to update the time of the database 'isCreated' field when new user get registered.So i'm confusing which time to use?Server time or user's time?Plz can you help me?

Member Avatar

server time. The time that the user sees (if you want this) should be sent via the timezone set by the user in their profile (if you have this set up for them).


user table

user_tz (use this to modify the datetime [or the alternative format] as seen by the user)