title: Checkbox processing with PHPexcel Output
body: <p>This my script...</p>
  
  <pre><code>$students=isset ($_POST['students'])  ? $_POST['students'] : '';
  for($i = 1; $i &lt;= $students; $i++)
  {
      $student = isset ($_POST['student'.$i]) ? $_POST['student'.$i]: '';
  
      $nilai= mysql_query ("SELECT * FROM student,s_semester where
      student.id=s_semester.student_id_fk AND student.id='$student' GROUP by student.id");
  
      $rowNya = 2;
      $no = 0;
  
      while ($data=mysql_fetch_array($nilai)) {
          $no = $no +1;
  
  
          $objPHPExcel-&gt;setActiveSheetIndex(0)
              -&gt;setCellValue("A$rowNya", $no)
              -&gt;setCellValue("B$rowNya", $student)
              -&gt;setCellValue("C$rowNya", $data['idcard'])
              -&gt;setCellValue("D$rowNya", $data['status']);
          $rowNya = $rowNya + 1;
      }
  
      // Rename sheet
      $objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('Simple');
  }
  
  header('Content-Type: application/vnd.ms-excel');
  header('Content-Disposition: attachment;filename="database_anggota.xls"');
  header('Cache-Control: max-age=0');
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
  $objWriter-&gt;save('php://output');
  exit;
  </code></pre>
  
  <p>And my problem is, the excel output only one record of data that appears, i use checkbox before.. I check 3/4/5 or etc only 1 appears... If the output pdf and i use FPDF this script runnning well..</p>
  
  <p>please help me...</p>