Jump to content

Recommended Posts

this is a code i found in a template system

<span style="float: right; text-align: right;"><a target="_blank" rel="external" href='javascript:window.location="mai"+"lto:"+"admin"+"@"+"randomgamedesign.uk.tt";self.close();' onmouseover='window.status="mai"+"lto:"+"admin"+"@"+"randomgamedesign.uk.tt"; return true;' onmouseout='window.status="";return true;'>Email </a></span>

 

how can i use this code or something similar so you can only email them, and not see there email when you mouseover?

Link to comment
https://forums.phpfreaks.com/topic/104104-solved-email-code-where-email-is-hidden/
Share on other sites

That is javascript you have there.  If you don't want them to see your email use a PHP mailing script.

 

Here is a tutorial of what I am thinking you are trying to achieve:

http://forums.xtreme-pixel.com/PHP-Mail-Form-t418.html

 

Please reply if I misunderstood what you wanted to achieve.

near the same thing but this is for a user profile, it is so they don't recieve spam mail, but i can't see how to change

href='javascript:window.location="mai"+"lto:"+"admin"+"@"+"randomgamedesign.uk.tt";self.close();

so it is an email from my database.

I think I understand now.

Use explode function on there email address.

 

<?php
$email = "admin@randomgamedesign.uk.tt";
$email = explode($email, '@');
?>
<span style="float: right; text-align: right;"><a target="_blank" rel="external" href='javascript:window.location="mai"+"lto:"+"<?php echo $email[0]; ?>"+"@"+"<?php echo $email[1]; ?>";self.close();' ;return true;'>Email </a></span>

Does that make sense?

i tried this way , and it didn't work

<?php
$email = "admin@randomgamedesign.uk.tt";
$email = explode($email, '@');
?>
<span style="float: right; text-align: right;"><a target="_blank" rel="external" href='javascript:window.location="mai"+"lto:"+"<?php echo $email[0]; ?>"+"@"+"<?php echo $email[1]; ?>";self.close();' ;return true;'>Email </a></span>

 

so i think i will have to try this way, and have two input boxes one for

"email" and another for "hotmail.com".

Unless anyone knows a better way to reduce spam.

i tried this way , and it didn't work

<?php
$email = "admin@randomgamedesign.uk.tt";
$email = explode($email, '@');
?>
<span style="float: right; text-align: right;"><a target="_blank" rel="external" href='javascript:window.location="mai"+"lto:"+"<?php echo $email[0]; ?>"+"@"+"<?php echo $email[1]; ?>";self.close();' ;return true;'>Email </a></span>

 

so i think i will have to try this way, and have two input boxes one for

"email" and another for "hotmail.com".

Unless anyone knows a better way to reduce spam.

Try explode('@',$email);

Sorry, I made a mistake in the function syntax.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.