Jump to content


This topic is now archived and is closed to further replies.


Displaying URL field from database causes duplicate link ... why?

Recommended Posts

I'm extracting a field from a MySQL database to display in a page as a hyperlink. The field contains a url like www.yoursite.com and i'm using this code to display it in an 'echo' statement containing  a large amount of HTML. Here's how the field is displayed:

[code]<b>•</b> <a class="body" href="$url">Click Here To Visit My Site</a>[/code]

The page displays it just fine as a hyperlink. But, the problem is when you mouse over it I get a duplicate URL like this:


Which makes it appear as though it's treating the field data as a 'relative' link instead of just inserting it as it should. Ideas?

Share this post

Link to post
Share on other sites
heh.. never mind :)

I answered my own question. The problem was that the entries in the database didn't include http:// and were just www.yoursite.com. I updated that field to include the http:// and now they work properly.

Just an FYI for any others who want to include URL's into their pages :)

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.