Jump to content

Recommended Posts

Posted

I have always used and ASCII equivelant to code my email addresses into a page. WHY does it keep magically changing from (pardon the spaces and it's abbreviated)

& # 119 ; & # 101 ; & # 98 ; & # 109 ; & # 97 ; & # 115;
To -

& amp ; amp ; amp ; # 119 ; & amp ; amp ;amp ; # 101 ;

 

etc, etc. It only does this to me on one site. I just don't get it.

 

Meanwhile, how else can I hide it within a hidden input field in a form?

 

eg: <INPUT TYPE="HIDDEN" NAME="submit_to" VALUE="me@mysite.com">

 

This is driving me nuts. :lol:

 

Thanks

 

 

(actually this one site does a lot of wierd things the other ones do not do.)

Posted

well, what you entered above works for me so i can't help you there..

 

as for how else to hide it.. i don't really know what you're doing but it looks like some kind of e-mail form or something. if you submit the form to a php page, you could have the form be something like this:

 

theform.html

><form method="post" action="emailme.php">
From:
<input type="text" maxlength="15" name="whofrom" value="JoeSchmoe" />
<br />
Comment:
<input type="text" maxlength="100" name="thecomment" value="Cool site!" />
<br />
<input type="submit" value="send" />
</form>

 

emailme.php:

><?
require('/home/username/safe/myemail.php');

if(mail($myemail, "Comment from $whofrom", "$whofrom said: \n\n $thecomment")){
echo 'Message sent!';
} 
else{
echo 'Error! Message not sent!';
}
?>

 

the following would be placed somewhere not in the public_html folder (in this case, in a folder called 'safe' which is NOT in your public_html folder) so no one can access it from the web. this may be much too drastic security measures for your purposes, so you could put the one line here in place of the require line above. however, if you do it this way, no one can access it from the web, only you and your webserver can get it.

myemail.php:

>$myemail = 'me@mysite.com';

 

 

this way your email never shows up in any source code, not even as ascii characters or in a hidden input (which is visible in the source of the page) or where ever else. the client never receives the address.

 

of course, like i said, i don't even know what your purposes are, but whatever it is, if it's a form, it can be done that way. and even if it's not a form, you can probably morph the code so it works how you need it to.

Posted

Ty,

Do you have a link that shows us the messed up version? It may help figure out what's happening.

Posted (edited)

I will certainly look. Pretty sure I corrected them all.

 

Then again, this is me and I always miss something :)

 

=========================================

 

Ok - http://lyricsplayground.com/cbb/info.html

 

Down at line 162 I think you'll see it.

 

Thanks.

 

....told ya I'd miss one!!

 

==========================================

 

Hm, actually when you view source it is perfectly normal - this is getting wierder. When I look at it in file manager it has & between each ascii character.

 

Needless to say the mail won't mail.

 

==========================================

 

I give up.

 

now it IS working fine, even with the malformed address. I don't get it.

Edited by boxturt

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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