I am a beginner to codeigniter and, I'm trying to make an inventory system. The dashboard is ready, but when I click a button on dashboard it gives an error, it is not loading the new product view I defined the routes tried much but no positive result
Here is my controller
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller {
public function _construct(){
parent::_construct();
$this->load->database();
$this->load->model("m_inventory");
$this->load->helper('form');
$this->load->library('form_validation');
}
public function add_items(){
$this->load->view('newproduct');
}
}
And my dashboard view
<div class="form">
<h2>Inventory System</h2>
<div class="button1">
<a title="New account" href='<?php echo base_url ('dashboard/add_items'); ?>New product</a>
</div>
<div class="button2">
<input type="submit" name="submit" value="Current Stock" >
</div>
</div>
If above doesn't help you then share the error you are getting and CI version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.