help with web links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
taterman
Forum Newbie
Posts: 13
Joined: Mon Apr 09, 2007 10:49 am

help with web links

Post by taterman »

When I display web links that are stored in the MySQL database as:

<a href=”www.weblink.com”>weblink</a>
(I store the whole string http://www.weblink.com into the database)

The links do not work because they end up being attached to the http://localhost. How do I get them to be stand alone web links?



Thanks for your time.
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

when you echo them, echo them with http:// in front of them like <a href="http://www.example.com">
taterman
Forum Newbie
Posts: 13
Joined: Mon Apr 09, 2007 10:49 am

Post by taterman »

Thanks for the reply.

That worked. I knew it had to be something simple.


Thanks
Post Reply