注意:未定义的索引:第59行的C:\ xampp \ htdocs \ dbkaryawan \ report.php中的tgl1

时间:2019-01-25 03:25:28

标签: php phpmyadmin

<?php

      include('koneksi.php');

      //echo "<script>console.log(".$_GET['tgl1'].")</script>";

      $query = mysql_query("SELECT * FROM datakaryawan a inner join absenkaryawan b 
        on a.id_karyawan = b.id_karyawan 
        where date_format(b.tanggal, '%d-%m-%Y') BETWEEN '".$_GET['tgl1']."' AND  '".$_GET['tgl2']."'
        ORDER BY b.tanggal") or die 
      (mysql_error());

      if(mysql_num_rows($query) == 0 ){

        echo '<tr><td colspan ="6">Tidak Ada Data!</td></tr>';

      }else{ 

        $no =1;       
        while($data = mysql_fetch_assoc($query))
        {      
        echo '<tr>';    
           echo '<td align="center">'.$no.'.</td>';
           echo '<td>'.$data['kode'].'</td>'; 
           echo '<td>'.$data['nama_karyawan'].'</td>';  
          echo '<td>'.$data['jenis_kelamin'].'</td>';
           echo '<td>'.$data['tanggal_lahir'].'</td>';
           echo "<td><img src='images".$data['foto']."' width='100' height='80'></td>";
           echo '<td>'.$data['kehadiran'].'</td>';

        echo '</tr>';

           $no++;  
        }

      }
      ?>

0 个答案:

没有答案