⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Got spammed by errors, cant edit or view



Dorian Brncic
  • profile picture
  • Member

Posted 06 September 2016 - 12:16 PM

I have no idea what went wrong. 

 

 

this is end i get:

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant ID - assumed 'ID'

Filename: core/Loader.php

Line Number: 304

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant postovi - assumed 'postovi'

Filename: core/Loader.php

Line Number: 304

 

this is code 

 

<?php class list_news extends CI_Controller {
 
function __construct()
{
        parent::__construct();
 
 
/* Standard Libraries */
$this->load->database();
$this->load->library('session');
$this->load->helper('url');
 
/* ------------------ */    
$this->load->library('Grocery_CRUD');    
}
 
 
 
function postovi($output = null)
 
{
$this->load->view('list_news_view.php',$output);    
}
 
function index()
 
{
$output = $this->grocery_crud->render();
 
$this->postovi($output);
 
}
 
}
?>
 

EDIT 2: also file upload is not working right, it does put file on server, but it says error and then removes name and all form form. 

it was created by this tutorial: 

http://www.grocerycrud.com/examples/set_upload_field_example

 

 

 

EDIT 3 : i can now edit and view, ERROR: 

 

A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$ID

Filename: libraries/Grocery_CRUD.php

Line Number: 1595

 

 

IS no more. 

 

now i cant upload ( it does get on server, it uploads, but i got alert that there was an error... and it wont let me submit form . ) and i still have this 2 errors : 

 

 

 

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant ID - assumed 'ID'

Filename: core/Loader.php

Line Number: 304

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant postovi - assumed 'postovi'

Filename: core/Loader.php

Line Number: 304