Jump to content

[SOLVED] email code, where email is hidden


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 = "[email protected]";
$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 = "[email protected]";
$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 = "[email protected]";
$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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.