下面是我想实现的:
用户点击编辑之后利用ajax调用一个新的界面,然后编辑完之后单击提交POST到后台操作
但是发现post之后都是空数据,是什么原因呢?该怎么解决呢?
下面是我的编辑页代码
<?php
session_start();
include("../conn/conn.php");
include("../inc/func.php");
$pw_id=$_GET['pw_id'];
$sql="SELECT `pw_id`,`k1`,`k2`,`k3`,year,`student_num`,`week_time`,`has_exam`,paee_work_theory.`remark`,`co_tid`,`verify`,`weeks`,paee_course.name FROM `paee_work_theory`,paee_course WHERE paee_course.pc_id=paee_work_theory.pc_id and pw_id='$pw_id' order by paee_work_theory.pw_id desc";
$record=mysql_query($sql,$conn);
$row=mysql_fetch_array($record);
header('Content-type:text/html;charset=GBK');
?>
<form name="form1" id="form1" method="post" action="../inc/confirm_basic.php">
<input type="hidden" name="pw_id" value="<?php echo $row['pw_id'];?>">
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><?php echo $row['pw_id'];?></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><?php echo $row['name'];?></span></div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="txt"><input name="k1" size="10" value="<?php echo $row['k1'];?>"></a></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><input name="k2" size="10" value="<?php echo $row['k2'];?>"></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><input name="k3" size="10" value="<?php echo $row['k3'];?>"></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><?php echo $row['student_num'];?></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><?php echo $row['week_time'];?></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="txt"><?php echo $row['weeks'];?></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center">
<select name="has_exam" id="has_exam">
<option value="1" <?php if($row['has_exam']) echo "selected"?>>有</option>
<option value="0" <?php if(!$row['has_exam']) echo "selected"?>>无</option>