yes no option with javascript delete function for a link
<p>In 1stpage I have a table with full of data, and end of every row there is a delete link. When i click on that link, the link goes to another delete page where mysql delete query delete that particular data from database. That delete page redirect with the 1st page (location:1stpage). Now when i want to apply a javascript delete yes/no checking, every time it pops up with "Are you sure?" either i press yes or no the data is deleted from my table. I think the return false cannot working in this case. The code are in below. Please help me what should i do exactly.</p>

<p>Sorry for my bad english.
Thanks in advance.
1st page:</p>

<pre><code>&lt;?php
include "include.php";
?&gt;

&lt;script type="text/javascript"&gt;

function show_confirm()
{
var con = confirm("Are You Sure");
if (con ==true)
  {
  alert("You pressed OK!");
  }
else
  {
  alert("You pressed Cancel!");
  }
}


 &lt;/script&gt; 
&lt;table&gt;
  &lt;tr&gt;
    &lt;td align="center"&gt;EDIT OR DELETE DATA&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;table border="1"&gt;
      ?php
        if(isset($_POST['submit']))
        {
            $order = "UPDATE books SET author='$_POST[author]', title='$_POST[title]', price='$_POST[price]' WHERE isbn='$_POST[isbn]'";
            mysql_query($order) or die (mysql_error());
        }   

      $order = "SELECT * FROM books ORDER BY author" or die (mysql_error());
      $result = mysql_query($order);
      while ($row=mysql_fetch_array($result))
      {
        echo ("&lt;tr&gt;
                &lt;td&gt;$row[isbn]&lt;/td&gt;
                &lt;td&gt;$row[author]&lt;/td&gt;
                &lt;td&gt;$row[title]&lt;/td&gt;
                &lt;td&gt;$row[price]&lt;/td&gt;
                &lt;td&gt; &lt;a href=\"editdata_form.php?isbn=$row[isbn]\"&gt; Edit &lt;/a&gt; &lt;/td&gt;
                &lt;td&gt; &lt;a href=\"delete.php?isbn=$row[isbn]\" onclick='show_confirm()'&gt; Delete &lt;/a&gt; &lt;/td&gt;
              &lt;/tr&gt;");
      }       

  ?&gt;
      &lt;/table&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>the page where mysql delete query run :</p>

<pre><code>&lt;?php header("Location: editordeletedata.php"); ?&gt;  
&lt;p&gt; &lt;title&gt;delete&lt;/title&gt; &lt;/p&gt;
&lt;?php
include "include.php";
?&gt;

&lt;?php

if(isset($_GET['isbn']))
{
    $order = "DELETE FROM books WHERE isbn = '$_GET[isbn]'";
    mysql_query($order) or die (mysql_error());
}


?&gt;
</code></pre>
