npsari Posted May 1, 2007 Share Posted May 1, 2007 I am using the below php email from: I have the email field hidden... while($row = mysql_fetch_array($result)) { echo "<form name=\"theform\" action=\"/email.php\" method=\"POST\">"; print "<INPUT TYPE=hidden NAME=\"email\" value=\"myemail@yahoo.com\" SIZE=1><BR>"); print "Your email:"; print "<INPUT TYPE=TEXT NAME=\"sender\" value=\"\" SIZE=25><BR><BR>"; print "Message body:"; print "<TEXTAREA NAME=\"message2\" ROWS=7 COLS=35></TEXTAREA><BR><BR>"; echo("<input type=\"image\" name=\"SUBMIT\" src=\"/h-images/all/email.gif\">"); echo("</form>") } But when a user clicks on view PageSource They can see my email Is there anyway to hide it completely? Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/ Share on other sites More sharing options...
trq Posted May 1, 2007 Share Posted May 1, 2007 Is there anyway to hide it completely? No, not if you want it in the form. Why do you need it in the form? Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242555 Share on other sites More sharing options...
TEENFRONT Posted May 1, 2007 Share Posted May 1, 2007 As thorpe said, why have it in the form? You can set the email as a var on email.php like... $email = "me@mydomain.com"; instead of (im guessing this is what your doing) grabbing it from POST $email = $_POST['email']; then do the mail(); dance. Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242558 Share on other sites More sharing options...
MadTechie Posted May 1, 2007 Share Posted May 1, 2007 can't you just pass the mailing info to a php page that uses mail! (of course this will show up on the mail sent) Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242563 Share on other sites More sharing options...
npsari Posted May 1, 2007 Author Share Posted May 1, 2007 Well, the email actually changes so, the field is like that... print "<INPUT TYPE=hidden NAME=\"email\" value=\"$row[Email]\" SIZE=1><BR><BR>\n"; As you can see, the email is derived from the mySQL databse This form allows users to send an email to each other But the reason of using the site for is to hide the email And now, i realized that people can see it from Page Source Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242565 Share on other sites More sharing options...
MadTechie Posted May 1, 2007 Share Posted May 1, 2007 #1 send the user id and lookup (the email via the id) before sending the mail #2 encrypt the email address and then decrypt it on the next page. Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242568 Share on other sites More sharing options...
TEENFRONT Posted May 1, 2007 Share Posted May 1, 2007 have email set as an ID then. so in the table where the users email is, im guessing your using an id like a primary key or whatever for each member? if so.. <INPUT TYPE=hidden NAME=\"email\" value=\"$row[iD]\" SIZE=1><BR><BR>\n"; then on the email.php before the mail(); grab the email row from the database where it matches ID Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242570 Share on other sites More sharing options...
npsari Posted May 1, 2007 Author Share Posted May 1, 2007 Good idea Thats a great way around it I will have to connect to mySQL in the mail submit form Thanks for the info guys Never thought of that Quote Link to comment https://forums.phpfreaks.com/topic/49488-view-page-source-shows-my-email/#findComment-242577 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.