I have a table being displayed that converts a file uploaded location (DocLoc) into a hyperlink. However, because the filename has spaces in it, the hyperlink drops them off. If I display the column docloc it shows:
uploading/minegem/GUI-MGEM-001 Bullet Programming.pdf
However, when I click the hyperlink I get
uploading/minegem/GUI-MGEM-001
How can I have the hyperlink add the rest of the filename so I can open the file from the link?
// Printing table rows
while($row = mysql_fetch_array($result))
{
$docname=$row['DocName'];
$docver=$row['DocVer'];
$doctype=$row['DocType'];
$docloc=$row['DocLoc'];
echo "<tr>";
echo "<td><a href=/uploading/$docloc>$docname</a></td>";
echo "<td>$docver</td>";
echo
echo "</tr>";
}
echo "</table>";
Sorry if this is stupid, I have done a bit of googling and reading around here and I'm struggling. I only started learning PHP, MySQL, and HTML about three days ago.