I am getting last inserted row in save page when adding dynamically inserting each row.
any body help me i want to get all records in save page.
my add-remove-row.php is
<htmnl>
<head>
</head>
<body>
<form action="save.php" method="post" name="assigndate" enctype="multipart/form-data" >
<table rules="all" style="background:#fff;">
<tr>
<td style="font-size:14px;" >Name</td>
<td style="font-size:14px;">Email</td>
<td style="font-size:14px;">Mobile</td>
<td><span style="font:normal 12px agency, arial; color:blue; text-decoration:underline; cursor:pointer;" onClick="addMoreRows(this.form);">
Add More
</span>
</td>
</tr>
<tr id="rowId">
<td><input name="name" type="text" id="name" size="17%"/></td>
<td><input name="email" type="text" id="email" /></td>
<td><input name="mobile" type="text" id="mobile" /></td>
</tr>
</table>
<tr><td>
<div id="addedRows"></div>
</td>
</tr>
<input type="submit" name="submit" id="submit" value="submit"/>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
var rowCount = 1;
function addMoreRows(frm) {
rowCount ++;
var recRow = '<p id="rowCount'+rowCount+'"><tr><td><input name="name" id="name" type="text" size="17%" maxlength="120" /></td><td><input name="email" id="email" type="text" maxlength="120" style="margin: 4px 5px 0 5px;"/></td><td><input name="mobile" id="mobile" type="text" maxlength="120" style="margin: 4px 10px 0 0px;"/></td></tr> <a href="javascript:void(0);" onclick="removeRow('+rowCount+');">Delete</a></p>';
jQuery('#addedRows').append(recRow);
}
function removeRow(removeNum) {
jQuery('#rowCount'+removeNum).remove();
}
</script>
</body>
</html>
and my save page is save.php
<?php
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$mobile=$_REQUEST['mobile'];
echo $name;
echo $email;
echo $mobile;
?>