Jump to content


Photo

mailto ref in echo text


  • Please log in to reply
5 replies to this topic

#1 bladechob

bladechob
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationDerby, UK

Posted 28 September 2006 - 03:18 PM

I've finally got this echo to work in a file but I need the email address to be ahref mailto linked. When I add the required bits in the echo it fails to function so I'm probably apply it in the wrong area. Can anyone help please? The current code string is:

if (!$num)
					 echo "<font color=\"white\">We are sorry but the dates you have selected are either being provisionally held or not available. Please select another date range or contact Selina Brady on 0870 770 4032 or email info@southernsunresorts.co.uk"

What I'm doing is:

if (!$num)
					 echo "<font color=\"white\">We are sorry but the dates you have selected are either being provisionally held or not available. Please select another date range or contact Selina Brady on 0870 770 4032 or email <a href="mailto:info@southernsunresorts.co.uk.">info@southernsunresorts.co.uk.</a>";
Thanks
To forgive is to forget... to forget is... what was I saying?

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 28 September 2006 - 03:23 PM

You need to escape the quotes...

echo "<font color=\"white\">We are sorry but the dates you have selected are either being provisionally held or not available. Please select another date range or contact Selina Brady on 0870 770 4032 or email <a href=\"mailto:info@southernsunresorts.co.uk\">info@southernsunresorts.co.uk.</a>";


Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 September 2006 - 03:23 PM

WHy dont you use PHP to send the email? PHP can send emails. So why not create a link which send the user to your contact page if you ahve one.

Also the problem is you need to escape your double quotes in the string. Like you dont with this:
<font color=\"white\">We are sorry but the d...


#4 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 28 September 2006 - 03:24 PM

Wildteen, off topic....

Any idea why bladechob's code window scrolls and mine doesn't?

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 September 2006 - 03:25 PM

Its a bug with the overflow I think, if you add two lines it should add a scroll bar. Which i did for you.

#6 bladechob

bladechob
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationDerby, UK

Posted 28 September 2006 - 03:46 PM

Cheers pal, only goes to show that a couple of slashes can get things sorted!
To forgive is to forget... to forget is... what was I saying?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users