this is my php code(1st page):
<table width="600px" id="project">
<tr>
<td>1</td>
<td><textarea name="pro_1" cols="100" rows="2"></textarea></td>
</tr>
<tr>
<td>2</td>
<td><textarea name="pro_2" cols="100" rows="2"></textarea></td>
</tr>
<tr>
<td>3</td>
<td><textarea name="pro_3" cols="100" rows="2"></textarea></td>
</tr>
<input id="addbtn" type="button" name="addbtn" value="ADD">
incorporated with javascript for append the row when button is clicked:
$("#addbtn").click(function(){
var num=parseInt($("#project tr:last").text());
num+=1;
$("#project").append("<tr><td>"+num+"</td><td><textarea name='pro_"+num+"' cols='100' rows='2'></textarea></td></tr>");
});
The 2nd page is the important page where all data from 1st page display on it:
<table width="600px" id="project">
<tr>
<td>1</td>
<td><?php echo $_POST["pro_1"]; ?></td>
</tr>
<tr>
<td>2</td>
<td><?php echo $_POST["pro_2"]; ?></td>
</tr>
<tr>
<td>3</td>
<td><?php echo $_POST["pro_3"];?></td>
</tr>
</table>
My problem is that the data of appended row didn't show on 2nd page.How to make it?
The output as below:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…