用这个替换你的 php 部分:<?phprequire('connection.php');$status = '';$text = '';$com = '';$url = 'index.php';function timer($url){ sleep(3); header('Location: ' . $url); }if(isset($_POST['addCom'])) { $com= mysqli_real_escape_string($db,$_REQUEST['com']); $text = mysqli_real_escape_string($db,$_REQUEST['text']); $stmt = $db->prepare("insert into testcomments (com,text) values (?,?)"); $stmt->bind_param('ss',$com,$text); $stmt->execute(); $status = "Done "; $com= ''; timer($url);}?>
1 回答
- 1 回答
- 0 关注
- 153 浏览
添加回答
举报
0/150
提交
取消