<?php  
//select.php  
if(isset($_POST["employee_id"]))
{
 $output = '';
 include 'config.php';
 $query = "SELECT * FROM tb_informasi WHERE id_informasi = '".$_POST["employee_id"]."'";
 $result = mysqli_query($koneksi, $query);
 $output .= '  
      <div class="table-responsive">  
           <table class="table table-bordered" style="font-size:14px; font-family:Cambria;">';
    while($row = mysqli_fetch_array($result))
    {
     $output .= '
     <tr>  
            <td width="40%"><label>Tanggal Permohonan Informasi</label></td>  
            <td width="60%">'.tgl_indo(date("Y-m-d", strtotime($row["tgl_permohonan"]))).'</td>  
        </tr>
		<tr>  
            <td width="40%"><label>Nama Pemohon</label></td>  
            <td width="60%">'.$row["nama"].'</td>  
        </tr>
		<tr>  
            <td width="40%"><label>Pekerjaan</label></td>  
            <td width="60%">'.$row["pekerjaan"].'</td>  
        </tr>
        <tr>  
            <td width="40%"><label>Instansi</label></td>  
            <td width="60%">'.$row["instansi"].'</td>  
        </tr>
		<tr>  
            <td width="40%"><label>Alamat</label></td>  
            <td width="60%">'.$row["alamat"].'</td>  
        </tr>
		<tr>  
            <td width="40%"><label>Telpon/WhatsApp</label></td>  
            <td width="60%">'.$row["telp"].'</td> 
		</tr>
			<tr>  
            <td width="40%"><label>Email</label></td>  
            <td width="60%">'.$row["email"]'</td>  
        </tr>
        <tr>  
            <td width="40%"><label>Rincian Informasi</label></td>  
            <td width="60%">'.$row["rincian"].'</td>  
        </tr>
		<tr>  
            <td width="40%"><label>Tujuan Memperoleh Informasi</label></td>  
            <td width="60%">'.$row["tujuan"].'</td>
        </tr>
		<tr>  
            <td width="40%"><label>Cara Memperoleh Informasi</label></td>  
            <td width="60%">'.$row["cara_memperoleh"].'</td>
        </tr>
		<tr>  
            <td width="40%"><label>Cara Mendapatkan Informasi</label></td>  
            <td width="60%">'.$row["cara_mendapatkan"].'</td>
        </tr>
     ';
    }
    $output .= '</table></div>';
    echo $output;
}
?>

<?php
function tgl_indo($tanggal){
	$bulan = array (
		1 =>   'Januari',
		'Februari',
		'Maret',
		'April',
		'Mei',
		'Juni',
		'Juli',
		'Agustus',
		'September',
		'Oktober',
		'November',
		'Desember'
	);
	$pecahkan = explode('-', $tanggal);
	
	// variabel pecahkan 0 = tanggal
	// variabel pecahkan 1 = bulan
	// variabel pecahkan 2 = tahun
 
	return $pecahkan[2] . ' ' . $bulan[ (int)$pecahkan[1] ] . ' ' . $pecahkan[0];
}
?>