Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- if(!isset($_GET['id']))
- {
- $f = 'korisnici.txt';
- $file = file($f);
- foreach ($file as $red)
- {
- $red=explode("\t",$red);
- echo'<p><a href="?id='.$red[0].'">' .$red[1].'</a></p>';
- }
- }
- else
- {
- $id=$_GET['id'];
- echo'<h2>Detalji korisnika:</h2>';
- $f = 'korisnici.txt';
- $file = file($f);
- foreach($file as $red)
- {
- $red= explode("\t",$red);
- if($red[0]==$id)
- {
- foreach($red as $celija)
- {
- echo'<p>'.$celija.'</p>';
- }
- }
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement