php第二次记录删除,有问题?
php开发的网站,第一次,添加一条记录,显示了。然后,删除该记录,在添加同样的记录,在删除,此时就是删除不了。
必须关闭浏览器,重新登陆,才可以删除。
下面是代码:
<table align="center">
<tr><th>
<?php
require("../conn.php");
$userid=$_GET['uid'];
if($userid!='')
{
echo "<script language='javascript'>\n";
echo "window.alert('$userid');\n";
echo "</script>" ;
echo "正在删除......";
$sql="delete Devworkerrelation where userid=:B1";
$stmt=OCIParse($conn,$sql);
OCIBindByName($stmt,":B1",&$userid);
if(!OCIExecute($stmt))
{
$err = OCIError($stmt);
$errstr=$err['message'];
$errstr=str_replace(chr(10),'',$errstr);
echo "<script language='javascript'>\n";
echo "window.alert('$errstr');\n";
echo "</script>" ;
}
else
{
echo "<script language='javascript'>";
echo "window.dialogArguments.refresh_me();" ;
echo "window.close();";
echo "</script>" ;
echo "<script language='javascript'>\n";
echo "window.alert('$userid');\n";
echo "</script>" ;
}
OCIFreeStatement($stmt);
}
OCILogOff($conn);
?>
本人:QQ:253261362
</th></tr>
</table>