Error in selecting multiple rows by checkbox error Undefined index: checkbox
<p>I want to select multiple rows from <code>checkbox</code> and want to update them all at once by button click..I tried in several ways..but not work..can you give a help please? it shows an error as <code>Undefined index: checkbox</code></p>

<pre><code>&lt;td&gt;
    &lt;input type="hidden" name="id" id="id" value="&lt;?php echo $row["file_serial_id"]; ?&gt;" /&gt;
    &lt;input type="checkbox" name="checkbox[]" id="checkbox[]"  value="&lt;?php echo $row['file_serial_id']?&gt;" /&gt;
&lt;/td&gt;

if(isset($_POST['send_btn']) and $_POST['send_btn']=="Send"){
    $checkbox = $_POST['checkbox']; //from name="checkbox[]"
    $countCheck = count($_POST['checkbox']);

    for($i=0;$i&lt;$countCheck;$i++){
        $del_id = $checkbox[$i];
        $sql2 = "UPDATE retained_file_mst SET mark_to_dispose=1 WHERE file_serial_id='$del_id'";
        $result2 = mysql_query($sql2,$conn);
    }

    // if successful redirect to delete_multiple.php
    if($result2){
        echo "success";
    }else{
        echo "error";
    }
}
</code></pre>
