![]() |
local address inserted in front of links - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: local address inserted in front of links (/showthread.php?tid=14507) |
local address inserted in front of links - El Forum - 01-05-2009 [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. local address inserted in front of links - El Forum - 01-05-2009 [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... local address inserted in front of links - El Forum - 01-05-2009 [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! |