[eluser]jedd[/eluser]
When you post code segments, can you please identify if they are Controller, Model, View ?
I think your current problem is that this section of your controller (?) :
Code:
$query = $this->db->get('testimonial');
if($query->num_rows() > 0){ // it should be '$query' not '$user_row' my mistake
$data[] = $query->row();
}
$this->adm_testimonial($data);
... is not going to work as you think it might. I'd suggest that rather than shuffle stuff into data at this point (this function is in your controller, right, or am I confused?) you should just:
Code:
$query = $this->db->get('testimonial');
if ($query->num_rows() > 0) {
$result = $query->row();
}
$this->adm_testimonial($result);
And then in adm_testimonial - the controller not the view of the same name - grab $result from the parameter list.
So instead of what you have now:
Code:
function adm_testimonial($id=0)
.. you'd have
Code:
function adm_testimonial ($result = NULL)
And you'd test for $result not being NULL within that function.
At the moment you're sending $data across from one function, and calling it $id on the way into your other function, and $id already means something else somewhere else .. and, ya know, really, I think rather than trying to get re-directions working you should probably just focus on getting data working using conventional CI URL and pathing first.