Welcome Guest, Not a member yet? Register   Sign In
problem catching form value

heres my code form with looping textarea:

Quote:<? echo form_open('admin/addLesson'); ?>
<input type="hidden" name="lessnum" value="<? echo $lessNum; ?>" />
&lt;? for($a=1; $a<=$lessNum; $a++){ ?&gt; <----$lessNum is value that i got from another page.
Lesson Title: &lt;input type="text" name="&lt;? echo 'title'.$a; ?&gt;" /&gt;
&lt;textarea name="&lt;? echo 'content'.$a; ?&gt;"&gt;&lt;/textarea>
&lt;? } ?&gt;
&lt;input type="submit" value="Next" /&gt;
&lt;? echo form_close(); ?&gt;

the problem is that i cant get the value on looped items which is title and content.

here my controller:

Quote:function addLesson() {

echo "tester".$this->input->post('title$s');
what i was getting is if the number of loop is two.. ill get testertester.. cant get the post value.

How about

Theme © iAndrew 2016 - Forum software by © MyBB