最简单的插入~也差不进去了~算是废了~
---------------------------------
表的结构是这样的:这表有问题么!!???
---------------<table width="910" border="0">
<form action="pldeal.php" name="plxitong" method="post">
<tr>
<td >评论标题:</td><td width="794"><input name="shuode" type="text" size="15"></td>
</tr>
<tr>
<td>评论内容:</td><td><textarea name="shuohua" cols="50" rows="5"></textarea></td>
</tr>
<tr>
<td colspan="2"><input name="renming" type="hidden" value="why" /></td>
</tr>
<tr>
<td colspan="2"><input name="peidui" type="hidden" value="why" /></td>
</tr>
<tr>
<td></td><td><input name="tijiao" type="submit" value="提交" /><input name="congshe" type="reset" value="取消" /></td>
</tr>
</form>
</table>----------
pldeal.php页面:<?php include_once "conn.php";?>
<?
if($_POST["sumbit"])
{
$pltitle=$_POST["shuode"];
$plcontent=$_POST["shuohua"];
$plren=$_POST["renming"];
$plid=$_POST["peidui"];
$sql="insert into pl(pltitle,plcontent,plren,pltime,plid) VALUES('".$pltitle."','".$plcontent."','".$plren."',now(),'".$plid."')";
if(mysql_query($sql))
{
echo("<script language='javascript'>alert('恭喜您,添加成功!');window.location.href='index.php';</script>");
exit();
}
else
{
echo("<script language='javascript'>alert('失败,请联系管理员!');window.location.href='index.php';</script>");
exit();
}
}
?>
-----
点过来~ 没有任何反映~也没有报错!!!
---------------------------------
表的结构是这样的:这表有问题么!!???
---------------<table width="910" border="0">
<form action="pldeal.php" name="plxitong" method="post">
<tr>
<td >评论标题:</td><td width="794"><input name="shuode" type="text" size="15"></td>
</tr>
<tr>
<td>评论内容:</td><td><textarea name="shuohua" cols="50" rows="5"></textarea></td>
</tr>
<tr>
<td colspan="2"><input name="renming" type="hidden" value="why" /></td>
</tr>
<tr>
<td colspan="2"><input name="peidui" type="hidden" value="why" /></td>
</tr>
<tr>
<td></td><td><input name="tijiao" type="submit" value="提交" /><input name="congshe" type="reset" value="取消" /></td>
</tr>
</form>
</table>----------
pldeal.php页面:<?php include_once "conn.php";?>
<?
if($_POST["sumbit"])
{
$pltitle=$_POST["shuode"];
$plcontent=$_POST["shuohua"];
$plren=$_POST["renming"];
$plid=$_POST["peidui"];
$sql="insert into pl(pltitle,plcontent,plren,pltime,plid) VALUES('".$pltitle."','".$plcontent."','".$plren."',now(),'".$plid."')";
if(mysql_query($sql))
{
echo("<script language='javascript'>alert('恭喜您,添加成功!');window.location.href='index.php';</script>");
exit();
}
else
{
echo("<script language='javascript'>alert('失败,请联系管理员!');window.location.href='index.php';</script>");
exit();
}
}
?>
-----
点过来~ 没有任何反映~也没有报错!!!
<?
if($_POST["sumbit"])
{
$pltitle=$_POST["shuode"];
$plcontent=$_POST["shuohua"];
$plren=$_POST["renming"];
$plid=$_POST["peidui"];
$sql="insert into pl(pltitle,plcontent,plren,pltime,plid) VALUES('".$pltitle."','".$plcontent."','".$plren."',now(),'".$plid."')";
//输出看看什么内容
echo $sql ;
mysql_query($sql);
echo '总共响应行数:';
echo mysql_affected_rows();
exit();
if(mysql_query($sql))
{
echo("<script language='javascript'>alert('恭喜您,添加成功!');window.location.href='index.php';</script>");
exit();
}
else
{
echo("<script language='javascript'>alert('失败,请联系管理员!');window.location.href='index.php';</script>");
exit();
}
}
?>
pldeal.php没有任何的反映!!!
不知道为什么~~~~
在pldeal.php 的 <?php include_once "conn.php";?>
下面加上一句:
error_reproting(E_ALL);
有反应就怪了
额,还是老鸟厉害,应该是$_POST['tijiao']