[eluser]ede196620[/eluser]
hi everyone i am new to codeigniter. currently i am working on my first project with codeigniter i am trying to build a small survay website nothing impressive something simple. currently i am stuck in one place trying to save check box values to a table in database cant figure this one out. so my question is how can i store check box values in to a table on to a database using the cmv ? i already created a controller a model and a view for retrieving questions stored in the database and displayed on a web page all i need is to find out how can i store check box values using cmv ? tnx for you help in advance.
here is my view page:
Code:
<html>
<body>
<?php form_open('survay'); ?>
<?php foreach($survay_data as $survay):?>
<ul>
<li><h1><?php echo $survay->Question; ?></h1></li>
<li><?php echo $survay->qA; ?><input type="checkbox" name = "q1" value = "qA"></li>
<li><?php echo $survay->qB; ?><input type="checkbox" name = "q2" value = "qB"></li>
<li><?php echo $survay->qC; ?><input type="checkbox" name = "q3" value = "qC"></li>
</ul>
<?php endforeach; ?>
<input type="textarea" value='a' name="comment">
<br>
<?php echo form_submit('submit', 'Submit survay'); ?>
</body>
</html>
if u know any tutorials out there that provide an example how to do this can u post them tnx again.
if requested i can also post my controller and my model.