I'm struggling to convert links that from the database to hypertext.
Imagine a link string like http://example.com/file.txt
How do I change the echo statements to show the id filename on the download link?
<?php
$con=mysqli_connect("example.com","username","pass","example.com");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM moviebase");
echo "<table border='1'>
<tr>
<th> ID </th>
<th> File Name </th>
<th> Link 1 </th>
<th> Link 2 </th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['filename'] . "</td>";
echo "<td>" . $row['link1'] . "</td>";
echo "<td>" . $row['link2'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>