JTapp Posted February 17, 2008 Share Posted February 17, 2008 Hey Guys.. this is REALLY a simple one- but not for me 'cause I'm just now learning this stuff. The following code is my problem. When I preview it.. it looks like its working but my hyperlink is actually http://www.fieldcontents.com/$variable4 I need to drop the "$variable4" from my link.... ??? echo 'You must <a href="$variable4">Click Here To Go To The Lodge Website</a> to view this page'; Thanks for your help Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/ Share on other sites More sharing options...
pocobueno1388 Posted February 17, 2008 Share Posted February 17, 2008 All you need to do is use double quotes echo "You must <a href=\"$variable4\">Click Here To Go To The Lodge Website[/url] to view this page"; Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/#findComment-469198 Share on other sites More sharing options...
JTapp Posted February 17, 2008 Author Share Posted February 17, 2008 That worked, but everything below it has been turned into a link to that variable... Thanks Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/#findComment-469199 Share on other sites More sharing options...
pocobueno1388 Posted February 17, 2008 Share Posted February 17, 2008 It's because this site filtered out the closing of the link code. Change it to this: echo "You must <a href=\"$variable4\">Click Here To Go To The Lodge Website</a> to view this page"; Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/#findComment-469207 Share on other sites More sharing options...
JTapp Posted February 18, 2008 Author Share Posted February 18, 2008 All Set! Thanks! Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/#findComment-469242 Share on other sites More sharing options...
pocobueno1388 Posted February 18, 2008 Share Posted February 18, 2008 You keep forgetting to press solved, lol ;P Link to comment https://forums.phpfreaks.com/topic/91600-echo-hyperlink-not-working/#findComment-469254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.