Welcome Guest, Not a member yet? Register   Sign In
small blog help needed passing data
#10

[eluser]echo sara[/eluser]
ok i have made those changes and for some reason when it returns it returns as there no data in the database. i check to see if data was getting passed in the model and it did. Also getting a error on line 17. i have also attached my view just in case that the problem. but the key issue is that i get this "echo "there was no blogs added"; (else statement in the controller function even when their is data in the database.

Line 17 from controller
Code:
function entrytest($data) {

Controller
Code:
function entrytest($data) {
        $this->load->model('Entrymodel');
        $title = $this->input->post('title');
        $comment = $this->input->post('comment');
        $data = $this->Entrymodel->sendentry($title, $comment);
        
        if($data > 0){
                    var_dump($data);
        echo $data;
        $this->load->view('blogentryview', $data);
        }
        else {
            echo "there was no blogs added";
        
        }
        
    }


View
Code:
<html>
<h1> Success this is the blog page with the css styling </h1>

<h3>&lt;?php echo $data->title?&gt;</h3></br>
<h4>&lt;?php echo $data->body?&gt;</h4>

&lt;/html&gt;


Messages In This Thread
small blog help needed passing data - by El Forum - 08-11-2011, 05:06 PM
small blog help needed passing data - by El Forum - 08-11-2011, 06:30 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:58 AM
small blog help needed passing data - by El Forum - 08-12-2011, 08:06 AM
small blog help needed passing data - by El Forum - 08-12-2011, 01:30 PM
small blog help needed passing data - by El Forum - 08-12-2011, 03:26 PM
small blog help needed passing data - by El Forum - 08-12-2011, 03:31 PM
small blog help needed passing data - by El Forum - 08-12-2011, 04:02 PM
small blog help needed passing data - by El Forum - 08-12-2011, 04:39 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:04 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:15 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:31 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:42 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:46 PM
small blog help needed passing data - by El Forum - 08-12-2011, 05:48 PM
small blog help needed passing data - by El Forum - 08-12-2011, 06:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB