Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- $tampil=mysql_query("SELECT * FROM tb_kategori ORDER BY id_kategori ASC")or die('error:salah query kategori');
- $no=1;
- $sql="SELECT count(id_kategori) c FROM tb_hasil_temp WHERE username='{$_SESSION['username']}' AND id_kategori='%s";
- //$cek=mysql_query($sql);
- //$c=mysql_fetch_array($cek);
- while ($r=mysql_fetch_array($tampil)){
- echo"<tbody><tr>
- <td>$r[id_kategori]</td>
- <td>$r[nama_kategori]</td>";
- $sqlCari=sprintf($sql, $r['id_kategori']);
- $cek=mysql_query($sql) or die('error:'.$sql);
- $c=mysql_fetch_array($cek);
- if (empty($c['c']==0)){
- echo"<td><input type='button' value='Kategori $no' onClick='openWin$no()'></td>";
- }
- else{
- echo"<td> Sudah Mengerjakan</td>";
- }
- echo"</tr>
- </tbody>";
- $no++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement