Reputation: 2963
$this->load->library("input");
what is the point of loading above code? found it in someone's code. This is the function :
public function do_add(){
$this->load->library("input");
$title = $this->input->post("title");
$text = $this->input->post("text");
$this->load->model("post_model", "model");
$this->model->add($title, $text);
redirect(site_url("post"));
}
Upvotes: 0
Views: 3578
Reputation: 4128
From Codeigniter user guide:
Note: This class is initialized automatically by the system so there is no need to do it manually.
Upvotes: 3