04-21-2016, 12:31 AM
Hello,
I am trying to access views/blog_form.php but do not know what to type in the url to access that. Can anyone explain how to?
I can access blog by typing localhost/blog but not the next one.
routes.php
controllers/Blog.php
I am trying to access views/blog_form.php but do not know what to type in the url to access that. Can anyone explain how to?
I can access blog by typing localhost/blog but not the next one.
routes.php
PHP Code:
$route['default_controller'] = 'blog';
$route['blog_form'] = 'blog/blog_form';
controllers/Blog.php
PHP Code:
class Blog extends CI_Controller {
public function index()
{
$this->load->model('blog_model');
//$data['query'] = $this->blog->insert();
$data['title'] = $this->blog_model->select_blog();
$data['content'] = $this->blog_model->select_blog();
$data['date'] = $this->blog_model->select_blog();
$this->load->view('blog', $data);
//$this->load->view('blog');
}
public function blog_form()
{
$this->load->view('blog_form');
}
}
" If I looks more intelligence please increase my reputation."