Anchor helper |
[eluser]minim[/eluser]
Hye all, I'm having problem to call the controller function from my view. I got error Object not found!. Even though, I have followed step by step of tutorial. Here my code: View: <?php echo anchor('usercontoller/new/','add new data',array('class'=>'add')); ?> Controller: function new(){ // set common properties $data['title'] = 'Add new person'; $data['message'] = ''; // load another view $this->load->view('new', $data); Any Idea?
[eluser]minim[/eluser]
Tq for ur reply, but somehow doesn't w0rk for me...I'm using CI 2.01
[eluser]danmontgomery[/eluser]
new is a reserved keyword in PHP, you can't have a method, class, etc named new(). http://www.php.net/manual/en/reserved.keywords.php
[eluser]minim[/eluser]
Ok tq. I've changed to add but till now can't solved the error..Object not found! ;-(. Anything i've missed.
[eluser]JonoB[/eluser]
I bet that your controller is not actually called "usercontoller" |
Welcome Guest, Not a member yet? Register Sign In |