PHP新手问题 点击删除,提示删除成功,但是数据还在 50
<?phpsession_start();?><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http:...
<?phpsession_start();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><?php$sid = $_SESSION['deletename'];$mysql = mysqli_connect("localhost","root","123456","student");if(mysqli_connect_errno()){echo "连接数据库失败";}$mysql->query ( "delete from grade where sid = '".$sid."'");if(!$mysql->query){?><script language="javascript">alert("删除成功");</script><?php}else{?><script language="javascript">alert("删除失败");</script>}<?php}?><body></body></html>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询