![]() |
Unable to access value from controller to view.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Unable to access value from controller to view.. (/showthread.php?tid=62678) |
Unable to access value from controller to view.. - vijjucse - 08-13-2015 Hi, I am getting an error while accessing data from controller to view. The $data variable 'ddlcountry' is inaccessible in my view. following is the error code iam getting. I am new to codeigniter. please suggest the possible error cause. Code: A PHP Error was encountered RE: Unable to access value from controller to view.. - Ridd - 08-13-2015 Paste your code from controller and view ![]() RE: Unable to access value from controller to view.. - PaulD - 08-15-2015 I doubt this will enlighten you in any way, but that error is telling you that you have referenced a variable called ddlcountry on line 59 of your register.php view that has not been defined. I am sure that has been no help at all :-) Best wishes, Paul. RE: Unable to access value from controller to view.. - John_Betong - 08-15-2015 (08-13-2015, 06:25 AM)[email protected] Wrote: To help solve your problem, please supply the following: RE: Unable to access value from controller to view.. - Wouter60 - 08-16-2015 If your controller has this: PHP Code: $data['dllcountry'] = 'Some value'; In your view: PHP Code: <?php echo $dllcountry;?> |