Hi all
I've got code that loops trough database for certan value, and if that value is in record, it gives back name and ID.
What I wanna do is to make link to another page and send value ID of that record to other variable.
It gives me back values of:
$name with link
$name with link
$name with link
$name with link
and what I wanna to be shown is:
Name with link
Name with link
Name with link
Name with link
$result = mysql_query("select Sifra_apartmana, Naziv_objekta from apartmani where iznajmljivac = '$broj'") or
die (mysql_error());
echo "<b>Naziv apartmana: </b>";
while ($row = mysql_fetch_array($result))
{
$name = $row["Naziv_objekta"];
$ID = $row["Sifra_apartmana"];
echo "<br>\n";
print ('<a href="izmjena_apartmana.php?ID='.urlencode($ID).'">$name</a>');// This lane makes name with link
}
mysql_free_result($result);
}
Hope I've explain problem.
thnx