Advertisement
koki2000

like

Mar 5th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <?php
  2. require_once 'kapcsolat.php';
  3.  
  4. $result = $db->query(sprintf("SELECT * FROM `likeok`")) or die("szeva");
  5. if($result->num_rows){
  6.     while($table = $result->fetch_assoc()){
  7.         $newsid = $table['id'];
  8.         $userid = $table['userid'];
  9.         $likeoltad = $table['likeoltad'];
  10.         $like = $table['like'];
  11.         echo '<table border = "1">';
  12.         echo '<tr>';
  13.         echo '<td>'.' | hir: '.$table['news'].'</td>';
  14.         echo '</tr>';
  15.         echo '<tr>';
  16.         if($likeoltad=='0'){
  17.             echo '<td> <a href="./feldolgozo.php?news='.$newsid.'&user='.$userid.'">LIKE</a>'.$table['like'].'</td>';
  18.         }else{
  19.             echo '<td> <a href="./feldolgozo.php?news='.$newsid.'&user='.$userid.'">DISLIKE</a>'.$table['like'].'</td>';
  20.         }
  21.        
  22.         echo '</tr>';
  23.         echo '</table>';
  24.     }
  25.    
  26. }
  27.  
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement