Hi i want to add multiple rows dynamically of my form with same fields but different form field name (e.g. city1, city2, city3,... college1,college2,college3...) and then all data into mysql
I tried so my search but nothing works for me here is my code please help me in this
<div class="form_student_add">
<table class="dd" width="100%" id="data">
<tr>
<td>City</td>
<td>College</td>
<td>Name</td>
</tr>
<tr>
<td>
<select name="city" id="city">
<option selected="selected" value="0">--Select City--</option>
<?php
$sql=mysql_query("select * from tblcities");
while($row=mysql_fetch_array($sql))
{
$id=$row['city_id'];
$data=$row['city_name'];
echo '<option value="'.$id.'">'.$data.'</option>';
}
?>
</select>
</td>
<td>
<select name="college" id="college">
<option selected="selected" value="0">--Select College--</option>
<?php
$sql=mysql_query("select * from tblcollege");
while($row=mysql_fetch_array($sql))
{
$id=$row['college_id'];
$data=$row['college_name'];
echo '<option value="'.$id.'">'.$data.'</option>';
}
?>
</select></td>
<td><input name="full_name" type="text" placeholder="e.g. John Smith" /></td>
</tr>
</table>
<div class="form_btn_videos">
<input type="button" id="id="addTableRow"" name="addnew" value="Add New Part" />
</div>
</div>