php - Want to get value of textboxes -
what want is,
i have code generates 2 textboxes on button click event througn ajax many time button clicks. on click of submit button how can identify textboxes , getvalue of each textbox.
so want give dynamic name each text box.and on form submit want fetch each textbox's value.
can this
<input type="text" name="fname[]" value="hello" /> <input type="text" name="fname[]" value="world" /> and value on submit
<?php if(isset($_post['txtfname[]'])){ echo $_post['txtfname[0]']; } ?> can help?
the values in $_post['fname']-array.
meaning:
$_post['fname'][0] --> "hello"
$_post['fname'][1] --> "world"
Comments
Post a Comment