Advertisement
GWibisono

saya kurang tahu apa ini bisa?

Mar 19th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. $tampil=mysql_query("SELECT * FROM tb_kategori ORDER BY id_kategori ASC")or die('error:salah query kategori');
  4. $no=1;
  5. $sql="SELECT count(id_kategori) c FROM tb_hasil_temp WHERE username='{$_SESSION['username']}' AND id_kategori='%s";
  6. //$cek=mysql_query($sql);
  7. //$c=mysql_fetch_array($cek);
  8. while ($r=mysql_fetch_array($tampil)){
  9. echo"<tbody><tr>
  10. <td>$r[id_kategori]</td>
  11. <td>$r[nama_kategori]</td>";
  12.     $sqlCari=sprintf($sql, $r['id_kategori']);
  13.     $cek=mysql_query($sql) or die('error:'.$sql);
  14.     $c=mysql_fetch_array($cek);
  15.     if (empty($c['c']==0)){
  16.         echo"<td><input type='button' value='Kategori $no' onClick='openWin$no()'></td>";
  17.     }
  18.     else{
  19.         echo"<td> Sudah Mengerjakan</td>";
  20.     }
  21.    
  22.     echo"</tr>
  23.     </tbody>";
  24.     $no++;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement