ユーザーがリストから複数の国を選択すると、選択したリストをjqueryが実行し、国ごとに一連のフォームフィールドを作成するなど、いくつかの要素を追加するhtmlフォームがあります。
ユーザーが米国、中国、インドを選択したと仮定すると、この国ごとにフォーム フィールドが作成され、id asn name が *countryName_indexValue, customeName_countryName_indexValue.* として与えられます。
私の質問: ユーザーが入力して送信ボタンを押したときに、この追加された要素の値を php を介して mysql データベースに送信する必要があります。どうすればいいのですか?私を助けてください......
で、結果がこれ
<form>
<table>
<thead>
<tr>
<td>Country Name</td>
<td>Data01</td>
<td>Data02</td>
</tr>
</thead>
<!-- APPENDED ELEMENTS -->
<tbody>
<tr id="usa_0">
<td><input type="text" name="userCountry_usa_0" id="userCountry_usa_0"></td>
<td><input type="text" name="countryData01_usa_0" id="countryData01_usa_0"></td>
<td><input type="text" name="countryData02_usa_0" id="countryData02_usa_0"></td>
</tr>
<tr id="china_1">
<td><input type="text" name="userCountry_china_1" id="userCountry_china_1"></td>
<td><input type="text" name="countryData01_china_1" id="countryData01_china_1"></td>
<td><input type="text" name="countryData02_china_1" id="countryData02_china_1"></td>
</tr>
<tr id="india_2">
<td><input type="text" name="userCountry_india_2" id="userCountry_india_2"></td>
<td><input type="text" name="countryData01_india_2" id="countryData01_india_2"></td>
<td><input type="text" name="countryData02_india_2" id="countryData02_india_2"></td>
</tr>
</tbody>
</table>
</form>
ありがとうございました..