Jump to content


grocery crud with phil surgeons template

grocery

  • Please log in to reply
No replies to this topic

#1 Rajesh Ramachandran

Rajesh Ramachandran

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 02 November 2013 - 04:32 PM

hii ihave a question how to use grocery crud with phils template library here is my code controller --------------

public function user_management() { 
    $crud = new grocery_CRUD(); 
    $crud->set_subject('User'); 
    $output = $crud->render(); 
    $this->template->set_layout('blog') ; 
    $this->template->set('output', $output); 
    $this->template->title('home', 'Grocery-Crud'); 
    $this->template->build('grocery'); }

here is my view

 

        <?php foreach($css_files as $file): ?> <?php endforeach; ?> <?php foreach($js_files as $file): ?> <?php endforeach; ?>

       <?php echo $output; ?>
 

iam getting errors like

 

    A PHP Error was encountered Severity: Notice Message: Undefined variable: css_files Filename: views/grocery.php Line Number: 2 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/grocery.php Line Number: 2 A PHP Error was encountered Severity: Notice Message: Undefined variable: js_files Filename: views/grocery.php Line Number: 5 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/grocery.php Line Number: 5 A PHP Error was encountered Severity: 4096 Message: Object of class stdClass could not be converted to string Filename: views/grocery.php Line Number: 10 please help







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users