I'm building my first real CI app. I have to build a survey system--If the specifics are important, I'll elaborate.
What is the best way to post the info to the db from the user? In a single row, comma separated? I'm a noob here, so detail would be appreciated! :)
I should add: the user needs to have the ability to try multiple times for the test and have each test's score charted. Payment is required to take each test.
Here's where I'm at. This code works, but I'm sure there's a more elegant way to do things.
$this->db->select('credits')->from('be_user_profiles')->where('user_id', $this->session->userdata('id'));
$query = $this->db->get();
foreach ($query->result() as $row)
{
echo $row->credits;
}
What about this?