ok thanks..
Here is my controller.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper();
$this->load->library('grocery_CRUD');
}
public function customerdata()
{
$this->grocery_crud->set_table('customerdata');
$output = $this->grocery_crud->render();
/* echo "<pre>";
print_r($output);
echo "</pre>";
die();
*/
$this->_example_output($output);
}
function _example_output($output = null)
{
$this->load->view('our_template.php',$output);
}
}
/* End of file main.php */
/* Location: ./application/controllers/main.php */
And here is my View:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<?php
foreach($css_files as $file): ?>
<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
<script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<style type='text/css'>
body
{
font-family: Arial;
font-size: 14px;
}
a {
color: blue;
text-decoration: none;
font-size: 14px;
}
a:hover
{
text-decoration: underline;
}
</style>
</head>
<body>
<div style='height:20px;'></div>
<div>
<?php echo $output; ?>
</div>
</body>
</html>
/* end of our_template.php */
Using firebug in firefox..i see the below for "Add Record"
<a class="add-anchor" title="Add Record" href="http://localhost/CI/main/add">
Missing the index.php path. between CI and main path.
Thanks.