Display Saved Database Answers in Form Issue - 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 Saved Database Answers in Form Issue (/showthread.php?tid=52433) Pages:
1
2
|
Display Saved Database Answers in Form Issue - El Forum - 06-12-2012 [eluser]dhall[/eluser] So I went with #3 as it appeared to be the easier option. If test for rows and set the array just as you showed it. I am now getting this error: A PHP Error was encountered Severity: Notice Message: Trying to get property of non-object Filename: controllers/profile.php Line Number: 52 (this is the 'value' line below) Code: //set fields I get this error on every line where I have a $results->... when the db is blank. Display Saved Database Answers in Form Issue - El Forum - 06-12-2012 [eluser]dhall[/eluser] I was able to figure it out. My Model: Code: function get_profile() My Controller: Code: $results = $this->profile_model->get_profile(); Everything else was just as you suggested. Thanks for all your help!! |