Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Displaying URLS from MySQL Database



2:37 am on Jan 13, 2005 (gmt 0)

10+ Year Member

I am currently creating my first data base driven web site and Im suprised at how easy it is once you get the hang of it. Anyway I have a list of URLS I would like to display on my pages but they are not displaying correctly.

I query my data base and get the results, I have the following url in the database: [externalsite.com...]

Thing is when it gets displayed on the page, the URL to my site is attached to the beginning of the external one. So I get the following link on my page:
[mysite.com...] instead of just the [externalsite.com...] which is what i need.

Here is my code:

echo '<p><strong>', $row['title'], '</strong><br />';
echo $row['description'], '<br />';
echo '<a href=">', $row['url'], '" target="_blank">boooooo</a>';

If anybody can point me in the right direction id be very grateful.


2:57 am on Jan 13, 2005 (gmt 0)

10+ Year Member

I now have it sorted.

echo '<a target=new href=', $row['url'], '>', $row['url'], '</a>';


4:33 am on Jan 13, 2005 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Welcome the WebmasterWorld Tongpo!

As a general rule, whenever you see that sort of thing, it's because the browser thinks that what you have there is a relative URL that is relative to your current page. Usually THAT happens because it doesn't recognize that there is a protocol prefix at the front (http), which is exactly the case here.

Glad you got it sorted.


Featured Threads

Hot Threads This Week

Hot Threads This Month