[eluser]Greg Aker[/eluser]
Wow, fast responses! Many thanks.
I have tried both things you have suggested, and I am afraid I'm still banging my head against my desk.
in order to keep the code short, my controller is:
Code:
function viewQuestion()
{
$data['title'] = "Question View";
$data['heading'] = "Question View";
$urlSegment = $this->uri->segment(3);
$query = $this->db->query('SELECT * FROM test WHERE ques_num = "$urlSegment"');
$data['question'] = $query->result(); // or result_array()
$this->load->view('viewQuestion_view', $data);
}
and a bit of my view file looks like this:
Code:
<p><?=$question->question?></p>
<ol>
<li><?=$question->ans_1?></li>
<li><?=$question->ans_2?></li>
<li><?=$question->ans_3?></li>
<li><?=$question->ans_4?></li>
</ol>
I have tried taking the uri segment variable out, and making it a "hard number." Yes, the number I entered is in the database =) but, I'm not getting anything. No errors, and no dynamic info. The "static" code in my view file shows up, but nothing the controller is trying to feed to it from the db.
Thanks again,
-greg