mercredi 17 janvier 2018

how if the status is active then the button is also active in codeigniter

I have a problem, if status_sk = terbit then the button is active and if status_sk =on process then the button is off, in codeigniter. please help me

                foreach ($record->result() as $skl) {
           $status=$skl->status_sk;
                echo "<tr><td>$no</td>
                      <td>$skl->nama_ptk</td>
              <td>$skl->no_sk_kepsek</td>
                      <td >$skl->status_sk</td>
              <?php if ($status=='SK TERBIT'):?>
              <td >".anchor('ptk2/cetak_one_sk/'.$skl->id_ptk,' ',array('i class'=>'btn btn-success btn-sm icon fa fa  fa-print '))." </td>
              <?php else:?>
              <td >".anchor('ptk2/cetak_one_sk/'.$skl->id_ptk,' ',array('i class'=>'btn btn-success btn-sm icon fa fa  fa-print disabled '))." </td>
              <?php endif;?>

Aucun commentaire:

Enregistrer un commentaire