local address inserted in front of links |
[eluser]I666I[/eluser]
Hi, I'm trying to get my view to allow me to insert a hyperlink from an address that is pulled from the db. The link shows up, but no matter what I do, the current location is always prefixed to the url (e.g. www.site.com will link to http://currentsite.net/codeigniter/www.site.com). I've tried removing the base path from config, etc.. but can't seem to find the problem. Here is the view code: Code: echo "Online Address: " . "<a href=" . '"> $row->online_addr . '"' . " target=\"_blank\" />" . $row->online_addr . "</a>" . "</b><br>"; eh... the forum is screwing up the code example, hopefully it conveys the idea. The code works, just not totally. Any help would be appreciated.
[eluser]nEJC[/eluser]
This is not a result of your code, but browsers behaviour (and your falt ![]() Are you forgetting the http:// ? Right? Thats why browser thinks its a relative linke and acts acordingly...
[eluser]I666I[/eluser]
FACEPALM You hit the nail on the head. I hate it when these little things bugger you up and the solution is so simple. Thanks very much for your help. Cheers! |
Welcome Guest, Not a member yet? Register Sign In |