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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -