confirm alert not working 
<p>I want the work of the Control Panel in my site for members ...</p>

<p>I designed the page is displayed all the registered members on my site</p>

<p>And  i but it  checkbox front each member name ,becuase it allowed  to select multiple name then click delete button The following code works</p>

<p>but now i want confirm alert  before delete code working</p>

<p>even , if clicked on ok the deletion is working  , and if  clicked on cancel  the  is not working ..</p>

<p>how  i can work it ?</p>

<pre><code>&lt;?php
while($row = mysql_fetch_array($sql1))
{
?&gt;
  &lt;tr&gt;
      &lt;td align="center" bgcolor="#FFFFFF"&gt;&lt;input name="checkbox[]" type="checkbox" id="checkbox[]" value="&lt;?php echo $row['MemberID']; ?&gt;"&gt;&lt;/td&gt;
      &lt;td bgcolor="#FFFFFF"&gt;&lt;?php echo $row['MemberName']; ; ?&gt;&lt;/td&gt;
  &lt;/tr&gt;

&lt;?php
}

?&gt;

&lt;tr&gt;
    &lt;td colspan="5" align="center" bgcolor="#FFFFFF"&gt;&lt;input name="delete" type="submit" id="delete" value="delete"  onclick="javascript:return confirm('are you sure to delete this record???? ')"/&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;?php

$delete = $_REQUEST['delete'];
$checkbox = $_REQUEST['checkbox'];
$count = count($_REQUEST['checkbox']);

// Check if delete button active, start this
if($delete) {

    echo "&lt;script language=\"Javascript\"&gt;\n";
    for($i=0;$i&lt;$count;$i++){
        $del_id = $checkbox[$i];


        $sql = "Delete  FROM members where MemberID ='$del_id'";

        $sq2 = "Delete FROM joinroom where  MemberID ='$del_id'";

        $result1 = mysql_query($sql);
        $result2 = mysql_query($sq2);

        echo "else {\n";
        echo "alert ('Nothing deleted');\n }";
        echo "&lt;/script&gt;";
    }
}
?&gt;
</code></pre>

<p>Thanks a lot.........</p>
