worldcomingtoanend Posted April 1, 2010 Share Posted April 1, 2010 the following echoes very well but when i click on the link nothing happens. i have also tried experiementing with different url addresses but nothing is working...please help... <?php echo '<a href="www.ilovegirls.com">link to girls</a>'; ?>php Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/ Share on other sites More sharing options...
arbitter Posted April 1, 2010 Share Posted April 1, 2010 try href='http://www.ilovegirls.com' Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035129 Share on other sites More sharing options...
worldcomingtoanend Posted April 1, 2010 Author Share Posted April 1, 2010 try href='http://www.ilovegirls.com' the above is even worse because it doesnt even display the actual link Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035131 Share on other sites More sharing options...
Lukeidiot Posted April 1, 2010 Share Posted April 1, 2010 Try this: <?php echo "<a href='http://www.ilovegirls.com'>Link to girls</a>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035132 Share on other sites More sharing options...
arbitter Posted April 1, 2010 Share Posted April 1, 2010 Try this: <?php echo "<a href='http://www.ilovegirls.com'>Link to girls</a>"; ?> wow, that I didn't notice that Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035133 Share on other sites More sharing options...
Lukeidiot Posted April 1, 2010 Share Posted April 1, 2010 Try this: <?php echo "<a href='http://www.ilovegirls.com'>Link to girls</a>"; ?> wow, that I didn't notice that What didn't you notice? Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035134 Share on other sites More sharing options...
worldcomingtoanend Posted April 1, 2010 Author Share Posted April 1, 2010 thank you people for your help...I have tried it and its okay but why does the same syntax not work with links such as /women/girls/index.html, for example i noticed that this does not work... <?php echo "<a href='/women/girls/index.html'>go to girls</a>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035147 Share on other sites More sharing options...
Lukeidiot Posted April 1, 2010 Share Posted April 1, 2010 thank you people for your help...I have tried it and its okay but why does the same syntax not work with links such as /women/girls/index.html, for example i noticed that this does not work... <?php echo "<a href='/women/girls/index.html'>go to girls</a>"; ?> Works for me. Try it without the first / .. example ... <?php echo "<a href='women/girls/index.html'>go to girls</a>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035149 Share on other sites More sharing options...
oni-kun Posted April 1, 2010 Share Posted April 1, 2010 I would hardly call this PHP help, Why not learn how HTML works first? Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035154 Share on other sites More sharing options...
worldcomingtoanend Posted April 1, 2010 Author Share Posted April 1, 2010 thank you people for your help...I have tried it and its okay but why does the same syntax not work with links such as /women/girls/index.html, for example i noticed that this does not work... <?php echo "<a href='/women/girls/index.html'>go to girls</a>"; ?> Works for me. Try it without the first / .. example ... <?php echo "<a href='women/girls/index.html'>go to girls</a>"; ?> thank you Lukeidiot for your help......i know this is not that difficult..i hv been working on a lot of code and for some silly reason i just got stark on doing a simple thing like php and html links...thanks for your patience and kindness..by the way i like your username:) Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035163 Share on other sites More sharing options...
arbitter Posted April 1, 2010 Share Posted April 1, 2010 Try this: <?php echo "<a href='http://www.ilovegirls.com'>Link to girls</a>"; ?> wow, that I didn't notice that What didn't you notice? I didn't notice he put the ' around all the line and the " around the link, instead of otherwise Quote Link to comment https://forums.phpfreaks.com/topic/197212-why-is-this-html-link-echo-statement-not-working/#findComment-1035208 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.