Message: Undefined variable: data - 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: Message: Undefined variable: data (/showthread.php?tid=54783) |
Message: Undefined variable: data - El Forum - 09-25-2012 [eluser]Adnan1984[/eluser] Hello,i am using codeigniter version 2.1.2 and i have a little bit problem with variable. here is my code: In Controllers Code: class Site extends CI_Controller { In Views Code: ........................ I got error message and it says: Quote:A PHP Error was encountered Can you solve this problem? Thanks Message: Undefined variable: data - El Forum - 09-25-2012 [eluser]Sanjay Sarvaiya[/eluser] you are forget to load var at. Code: if($this->form_validation->run()== FALSE){ Message: Undefined variable: data - El Forum - 09-25-2012 [eluser]rochellecanale[/eluser] You forgot to declare the data Use this: Code: $data['success'] = 'successfully submitted!'; Message: Undefined variable: data - El Forum - 09-25-2012 [eluser]Adnan1984[/eluser] Now i got this solution. Thanks |