Can my php output be seen by the client side in this Jquery script? -


i have page contact form. email message email address. allow client modify email address message sent to, have created custom field (acf) recalled using:

<?php the_field('email_address'); ?> 

i have used in following jquery code, posts php file.

$("#submit").click(function(){             var address = <?php echo '"'; the_field('email_address'); echo '"'; ?>;             var name = $("#name").val();             var gender = $("#gender").val();             var email = $("#email").val();             var subject = $("#subject").val();             var message = $("#message").val();             $.ajax({                 type: "post",                 url: "php/contact.php",                 data: { address: address, name: name, gender: gender, email: email, subject: subject, message: message }             });             return false; }); 

the reason doing way hide email address client side, avoid being captured spammers. don't think works. how go making invisible?

thanks in advance.

edit: reason couldn't see in source because made type in field name. indeed looking way hide address. sorry, , thank you! facepalm

if view source in html page, should find email address in plain text right in javascript code question, this:

$("#submit").click(function(){     var address = "someone@somewhere.com"; 

since in html source code, can scraped.

you should see go on wire in plain text (both server client when page loads, , client server when ajax request submitted), unless using https.

rather sending email address client, why don't send identifies email address yet meaningless outside of system (like primary key of table in) , in contact.php?


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -