Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <!DCOTYPE html>
  2. <?php include("db_funkcije.php") ?>
  3. <html>
  4.     <head>
  5.  
  6.  
  7.  
  8.     </head>
  9.     <body>
  10.         <?php
  11.  
  12.             konektuj_se();
  13.  
  14.             $sifra=$_GET['sifra'];
  15.             $rok=$_GET['rok'];
  16.             $godina=$_GET['godina'];
  17.  
  18.             if($rok=="januar") $rok=="01";
  19.             else if($rok=="februar") $rok=="02";
  20.             else if($rok=="jun") $rok=="06";
  21.             else if($rok=="jul") $rok=="07";
  22.             else if($rok=="septembar") $rok=="09";
  23.  
  24.             $upit1="SELECT datum,indeks FROM polaganja WHERE sifra='$sifra'";
  25.  
  26.             $rezultat=mysqli_query($veza,$upit1);
  27.  
  28.             echo "<ul>";
  29.             while($red=mysqli_fetch_assoc($rezultat)){
  30.                 if(substr($red['datum'],0,4)==$godina){
  31.                     if(substr($red['datum'],5,2)==$rok){
  32.                         $a=$red['indeks'];
  33.                         $upit2="SELECT ime, prezime FROM studenti where indeks='$a'";
  34.                         $rezultat2=mysqli_query($veza,$upit2);
  35.                         $red2=mysqli_fetch_assoc($rezultat2);
  36.                         $ime=$red2['ime'];
  37.                         $prezime=$red2['prezime'];
  38.                         echo "<li>$ime $prezime</li>";
  39.                     }
  40.                 }
  41.             }
  42.             echo "</ul>";
  43.             diskonektuj_se();
  44.        
  45.         ?>
  46.         <input type="button" value="oceni kao uspesno" id="dugme1">
  47.         <input type="button" value="oceni kao neuspesno" id="dugme2">
  48.     </body>
  49. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement