SHARE
TWEET

a

a guest Dec 9th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7. <html>
  8.     <head>
  9.         <meta charset="UTF-8">
  10.         <title></title>
  11.     </head>
  12.     <body>
  13.         <?php
  14.         if(!isset($_GET['id']))
  15.         {
  16.             $f = 'korisnici.txt';
  17.             $file = file($f);
  18.             foreach ($file as $red)
  19.             {
  20.                 $red=explode("\t",$red);
  21.                 echo'<p><a href="?id='.$red[0].'">' .$red[1].'</a></p>';
  22.             }
  23.         }
  24.         else
  25.         {
  26.             $id=$_GET['id'];
  27.            
  28.             echo'<h2>Detalji korisnika:</h2>';
  29.             $f = 'korisnici.txt';
  30.             $file = file($f);
  31.             foreach($file as $red)
  32.             {
  33.                 $red= explode("\t",$red);
  34.                 if($red[0]==$id)
  35.                 {
  36.                     foreach($red as $celija)
  37.                     {
  38.                         echo'<p>'.$celija.'</p>';
  39.                     }
  40.                 }
  41.             }
  42.         }
  43.         ?>
  44.     </body>
  45. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top