[eluser]jvicab[/eluser]
usually the extra time is not an issue and that way makes your code clear, and modular, thereforre easier to troubleshoot and debug
I think in your approachm, you don't need the data parameter in the entrytest function, and you do when you call $this->Entrymodel->sendentry($title, $comment);, so it would look like:
function entrytest() {
$this->load->model('Entrymodel');
$title = $this->input->post('title');
$comment = $this->input->post('comment');
$data = $this->Entrymodel->sendentry($title, $comment);
if($data > 0){
echo $data;
$this->load->view('blogentryview', $data);
}
else {
echo "there was no blogs added";
}
}
that way $data will hold what is returned by sendentry function and you will not have the Missing argument 1 for Entry::entrytest() and Undefined variable: data errors.