Page 1 of 1
How to make email into email links with mailto
Posted: Fri Dec 29, 2006 2:45 pm
by amir
Hello,
I am updating contact_us table from Admin Panel and displaying that to Public Panel. I am giving information like Feedback as
Myself ~ Web Master
webs@mail.com
What I want is when I give an email in this string, then that should become an email link to that email address with mailto:
TIA!
Posted: Fri Dec 29, 2006 2:48 pm
by John Cartwright
if you poked around a little for some email regular expressions, you'll find this is easily accomplished.
Hint.. preg_replace()
If your feeling really adventurous, check out the phpbb bbcode processor.
Posted: Fri Dec 29, 2006 3:12 pm
by RobertGonzalez
Is
The actual format of the string? Can you clarify exactly what you are dealing with here?
Posted: Sat Dec 30, 2006 11:19 am
by amir
For example, i am entering a string My name and then my email like
Mr. Developer
info@domain.com
then I want that script should deal the normal string " Mr. Developer " as normal and it should make email a link with mailto:
Thanks!
Posted: Sat Dec 30, 2006 11:25 am
by John Cartwright
amir wrote:For example, i am entering a string My name and then my email like
Mr. Developer
info@domain.com
then I want that script should deal the normal string " Mr. Developer " as normal and it should make email a link with mailto:
Thanks!
Again, a simple preg_replace, adding the <a> </a> tags around the match. Feel free to do a bit of research as we've had countless talks about email regular expression.
