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
- echo '<center>';
- echo '<a href="http://kresosusec.com.hr">'.'Početna'.'</a>'.'<br>';
- require 'konekcija.php';
- if(isset($_GET['broj']))
- {
- $broj=$_GET['broj'];
- $pocetno=($broj-1)*15;
- $y=($broj-1)*15;
- }
- else
- {
- $broj=1;
- $pocetno=0;
- $y=0;
- }
- echo '<table border="2">';
- echo '<tr><th>'.' '.'<th>'.'Ime'.'<th>'.'Prezime'.'<th>'.'MBR'.'<tr>';
- $query="select imeStud,prezStud,mbrStud
- from stud
- limit $pocetno,15";
- $result= mysqli_query($link, $query);
- while($row= mysqli_fetch_assoc($result))
- {
- $mbr='<a href="uredi.php?mbr='.$row['mbrStud'].'&broj='.$broj.'">'
- .$row['mbrStud'].'</a>';
- $y=$y+1;
- echo '<tr><td>'.$y.'<td>'.
- $row['imeStud'].'<td>'.
- $row['prezStud'].'<td>'.
- $mbr.'<tr>';
- }
- echo '</table>'.'<br>';
- $query2="select mbrStud from stud";
- $result2= mysqli_query($link, $query2);
- $numRows= mysqli_num_rows($result2);
- $total=ceil($numRows/15);
- if($broj>=$total)
- {
- echo '<a href="index.php">'.'Naprijed'.'</a>'.'<br>';
- }
- else
- {
- echo '<a href="index.php?broj='.($broj+1).'">'.'Naprijed'.'</a>'.'<br>';
- }
- for($x=1;$x<=$total;$x=$x+1)
- {
- echo '<a href="index.php?broj='.$x.'">'.$x.'</a>|';
- }
- if($broj<=1)
- {
- echo '<br>'.'<a href="index.php">'.'Natrag'.'</a>';
- }
- else
- {
- echo '<br>'.'<a href="index.php?broj='.($broj-1).'">'.'Natrag'.'</a>';
- }// put your code here
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment