Data pass from one function to another in same controller? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Data pass from one function to another in same controller? (/showthread.php?tid=58612) |
Data pass from one function to another in same controller? - El Forum - 06-29-2013 [eluser]Xeroxeen[/eluser] 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? Model Code: function getEmail($logindata) Controller Code: public function Login() View Code: <?php echo form_input(array('name'=>'email','readonly'=>'true','value'=>$emaigot));?> Data pass from one function to another in same controller? - El Forum - 06-30-2013 [eluser]anis2505[/eluser] Hi, Sorry to say that but your controller gives me a headache. Please restructure it. Why are you loading the the login view even if there is a post that doesn't make sense. you are loading twice the views header and footer. On the View the $emailgot miss typed. Code: value=>$emaiLgot Data pass from one function to another in same controller? - El Forum - 06-30-2013 [eluser]Xeroxeen[/eluser] [quote author="anis2505" date="1372584123"]Hi, Sorry to say that but your controller gives me a headache. Please restructure it. Why are you loading the the login view even if there is a post that doesn't make sense. you are loading twice the views header and footer. On the View the $emailgot miss typed. Code: value=>$emaiLgot This is the update information page.Once user registered he/she gets a confirmation email.Once he clicks on it,he redirects to the update info page.To update the info in the database i want the email address.That's why i'm using this.I think you understood it Data pass from one function to another in same controller? - El Forum - 06-30-2013 [eluser]anis2505[/eluser] Try this. Quote:Controller Code: public function Login() Quote:View Code: <?php echo form_input(array('name'=>'email','readonly'=>'true','value'=>$emailgot));?> |