PHP: Delete from a Database with some prompts from javascript
<p>My code is below, I am trying to delete records from mysql database but before deleting the browser has to prompt the user whether the deletion should continue. My problem is my logic is not working its deleting the record no matter what. Any help will be appreciated.</p>

<pre><code>   if (isset($_POST['outofqcellchat'])){
?&gt;
&lt;script type ="text/javascript"&gt;
var question = confirm("Are you sure you want to unsubscribe\nThis will delete all your facebook information in QCell Facebook");
if(question){
&lt;?php
$delusr = mysql_query("delete  from `chat_config` where `phone` = '$phonenumb'");
$row = mysql_num_rows($delusr);
if($row&gt;=1){
header("Location:http://apps.facebook.com/qcellchat");
}
?&gt;
alert("Unsubscribed, You can register again any time you wish\nThank You");
}else {
alert("Thanks for choosing not to unregister \nQCell Expand your world");
}
&lt;/script&gt;
&lt;?php
}
?&gt;
</code></pre>

<p>Thats my code. Please help</p>
