Okay, so what I've got here is a PHP generated table in which the values are pulled from a database. Now, if the administrator is logged in, I'd like to add an option to delete a row from the database.
I've got the structure all set up, but I have no idea what to put in the path of the link that is supposed to delete the row. How can I do this?
<?php
$rb = 1;
include 'konekcija.php';
$query = "SELECT * FROM oglasi";
$rezultat = mysql_query($query);
while($niz = mysql_fetch_array($rezultat)){
echo "<tr><td>" . $rb . "</td><td>" . $niz['model'] . "</td><td>" . $niz['cena'] . "</td><td><img src='" . $niz['slika_path'] . "'</img></td>";
if($_SESSION['uloga'] == "admin"){
echo "<td><a href='#'>Obrisi</a></td>";
}
echo "</tr>";
$rb++;
}
?>