Check box value doesn't come
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11260181/error-in-selecting-multiple-rows-by-checkbox-error-undefined-index-checkbox">Error in selecting multiple rows by checkbox error Undefined index: checkbox</a>  </p>
</blockquote>



<p>Im going to select multiple rows by checkbox but the checkbox value doesn't take to the variable $del_id is always null..Why is that? pleas help me</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 = isset($_POST['checkbox']) ? $_POST['checkbox'] : 0; 
     $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>
