savagenoob Posted May 20, 2009 Share Posted May 20, 2009 K, I'm actually embarrassed to present this, but is bugging me. I have a companies web address stored in a table, and when I display it I want it to be a link so the user can click and go right to the website. The problem is when I do this it appends the web address onto their current path on my site. Here is the code <a href="<?php echo $companyaddress; ?>"><?php echo $companyaddress; ?></a> and it displays as www.currentpathonmysite.com/www.companyaddress.com. I know someone can help with this quickly as most are not so nubbish Link to comment https://forums.phpfreaks.com/topic/158869-solved-super-noob-question/ Share on other sites More sharing options...
MasterACE14 Posted May 20, 2009 Share Posted May 20, 2009 simply add http:// to the front of it. <a href="http://<?php echo $companyaddress; ?>"><?php echo $companyaddress; ?></a> Link to comment https://forums.phpfreaks.com/topic/158869-solved-super-noob-question/#findComment-837912 Share on other sites More sharing options...
savagenoob Posted May 20, 2009 Author Share Posted May 20, 2009 Oh wow, thanks... I knew it was dumb. Link to comment https://forums.phpfreaks.com/topic/158869-solved-super-noob-question/#findComment-837913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.