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