Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:28:53+00:00 2026-06-07T11:28:53+00:00

I have a table being displayed that converts a file uploaded location ( DocLoc

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:28:54+00:00Added an answer on June 7, 2026 at 11:28 am

    Encode the URL using urlencode:

    echo '<td><a href="/uploading/'.urlencode($docloc).'">'.$docname.'</a></td>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table of data that is being sorted alphabetically, and it's a
I currently have a table with an id column that is being autoincremented and
I have a table of 3-4 columns, the central one being task names that
I have an html table containing values that are being generated from javascript. How
I have a MySQL table with about 5,000,000 rows that are being constantly updated
Basically I have a table that is being used to display data from an
I have a table that is passed via ajax and displayed. When the code
i have a list of products that are being displayed in particular order. store
I have a strange problem whereby the ValidationSummary is not being displayed. However, the
I have a table which is being dynamically populated, each row contains two textfields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.