![]() |
set_value() default value issues - 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: set_value() default value issues (/showthread.php?tid=20904) |
set_value() default value issues - El Forum - 07-24-2009 [eluser]megabyte[/eluser] I have a form, and the same view does adds and edits so I'm using this format for my code in the form Code: $course_name = array('name' => 'course_name', notice the empty Code: $data['row'] = array(); in the add method. I thought this would suppress any erros but im getting Code: A PHP Error was encountered Someone tell me what im doing wrong? set_value() default value issues - El Forum - 07-25-2009 [eluser]umefarooq[/eluser] in add $row is not an object, just a simple variable where as in edit its a database object which has course_name as object variable. in case of add leave the set value blank, where as in edit you can use it Code: $course_name = array('name' => 'course_name', hope it will work fine. |