我有如下代码:
<form method="post" name ="frm">
<table>
<tr>
<td>Name:</td>
<td><input type ="text" id="name"></td>
<td></td>
</tr>
<tr>
<td>Sex:</td>
<td>Female<input type ="radio" id="female" name="female"> </td>
<td>Male<input type ="radio" id="male" name="male"> </td>
</tr>
<tr>
<td colspan="3"><input type ="submit" id="btnSave" name="btnSave"></td>
</tr>
</table>
<?php
if(isset($_POST["btnSave"])){
//insert it to data base.........
// the problem is that during insert it to database ,the data will store in database but the form of Name value,Sex value,it displays empty
//I do not want like this ,What I want is : I want to keep the value of Name and Sex althought it inserted succesfull
}
?>
</form>
我需要:
在将数据插入数据库期间,我想保留表单的值,如姓名、性别值。那么我将如何解决这个问题。请任何人帮助我,谢谢。