我有一個PHP和鏈接的問題,我的意思是,我試圖使用<a href
鏈接一個票證的ID,然後顯示給用戶,但問題在於鏈接我得到的是像桌面和鏈接搞砸了代碼
,它只能像
http://localhost/ucp/viewticket.php?ticketid=8
這是代碼:
if ($result = $con->query($query))
{
echo '
<table id="tfhover" class="tftable" border="1">
<th>ID Tiketa</th>
<th>Autor</th>
<th>Naslov</th>
<th>Kategorija</th>
<th>Datum</th>
';
while ($row = $result->fetch_assoc())
{
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['Autor'] . "</td>";
echo "<td><a href=\"viewticket.php?ticketid=". $row['ID'] .">". $row['Naslov'] ."</a></td>";
echo "<td>" . $row['Kategorija'] . "</td>";
echo "<td>" . $row['Datum'] . "</td>";
echo "</tr>";
}
$result->free();
}