我的代码如下,我想删除mysql数据库中的记录,但在删除浏览器之前,必须提示用户是否应继续删除。我的问题是我的逻辑不管它删除记录,无论如何。任何帮助将不胜感激。PHP:从数据库中删除一些提示从javascript
if (isset($_POST['outofqcellchat'])){
?>
<script type ="text/javascript">
var question = confirm("Are you sure you want to unsubscribe\nThis will delete all your facebook information in QCell Facebook");
if(question){
<?php
$delusr = mysql_query("delete from `chat_config` where `phone` = '$phonenumb'");
$row = mysql_num_rows($delusr);
if($row>=1){
header("Location:http://apps.facebook.com/qcellchat");
}
?>
alert("Unsubscribed, You can register again any time you wish\nThank You");
}else {
alert("Thanks for choosing not to unregister \nQCell Expand your world");
}
</script>
<?php
}
?>
这就是我的代码。请帮助
我中号只使用一个页面而不是两个 – 2010-10-11 10:56:53
@Sheriffo是的,这正是你的问题。 – 2010-10-11 10:57:35
所以我不能这样做在一个页面 – 2010-10-11 11:00:09