![]() |
Display db data in edit profile page - 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: Display db data in edit profile page (/showthread.php?tid=52259) |
Display db data in edit profile page - El Forum - 06-03-2012 [eluser]Ignis Avis[/eluser] I want to display existing data in the fields when i will go to edit page. Here is my model function. Code: public function edit_user($member_id) Here is the controller function. Code: function edit_profile() and in my view file for a sing field I am using this. Code: <input type="text" value="<?php echo $row['full_name'];?>"/> But I am getting following error. Code: Severity: Notice Display db data in edit profile page - El Forum - 06-03-2012 [eluser]Glazz[/eluser] Instead of Code: $this->load->view('edit_profile.php', $this->data); Use: Code: $this->load->view('edit_profile.php', $data); Display db data in edit profile page - El Forum - 06-03-2012 [eluser]Ignis Avis[/eluser] I am using $this->data to load my template data which have been declared earlier. I am having problem with the variable row in view file. view is not recognizing that. what should i do to solve that issue? Display db data in edit profile page - El Forum - 06-03-2012 [eluser]Glazz[/eluser] If you need to have $this->data passed, you need to merge the $data, something like this: Code: $this->load->view('edit_profile.php', array_merge($this->data, $data) ); |