simcoweb Posted September 27, 2006 Share Posted September 27, 2006 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:[quote]http://www.yoursite.com/www.yoursite.com[/quote]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? Quote Link to comment Share on other sites More sharing options...
simcoweb Posted September 27, 2006 Author Share Posted September 27, 2006 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 :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.