<?php

include("konekcija.php");
$id = $_GET['id'];

$upit = "SELECT * FROM nastavnici WHERE id='" . $id . "'";
$rezultat = mysqli_query($konekcija, $upit);

if ($id != 0) {
    echo "<table border=1>";
    echo "<tr> <th>Ime</th> <th>Prezime</th> <th>E-mail</th>
		<th>Office</th> <th>Kursevi</th> </tr>";

    while ($red = mysqli_fetch_array($rezultat)) {
        echo "<tr>";
        echo "<td>" . $red['FirstName'] . "</td>";
        echo "<td>" . $red['LastName'] . "</td>";
        echo "<td>" . $red['EMail'] . "</td>";
        echo "<td>" . $red['Office'] . "</td>";
        echo "<td>" . $red['Courses'] . "</td>";
        echo "</tr>";
    }
    echo "</table>";
}
mysqli_close($konekcija);
?>