Avoid displaying javascript confirmation when no checkbox is set
<p>Like the title says, I have a problem with checkbox validation.
So, I have this line in my php file which displays users.</p>

<pre><code>&lt;a href='#' onclick='if(confirm("Are you sure?"))checkbox.submit()' class='bt_red'&gt;&lt;span class='bt_red_lft'&gt;&lt;/span&gt;&lt;strong&gt;Delete items&lt;/strong&gt;&lt;span class='bt_red_r'&gt;&lt;/span&gt;&lt;/a&gt;
</code></pre>

<p>in my delete_items.php file I wrote the following :</p>

<pre><code>$checkbox = $_REQUEST['checkbox'];
if(!isset($checkbox)) {
//diplay an error message :"No user selected"
} else {
if(isset($checkbox)) {
// deleting users script
}
}
</code></pre>

<p>In the 2 cases, when clicking on the "delete items" , I get the javascript confirmation message, which I don't want to display when no checkbox is set (the if(!isset($checkbox)) statement).</p>

<p>thank you for help.</p>
