So I've made a form validation in Javascript. It validates wether the input from the form is correct. So when all of the input fields are correctly filled in, I want to send an e-mail to the user containing some information:
var to = "info@test.com";
var subject = "subject";
var message = "This is the message";
So I want to change these variables into PHP variables so I can do the following in PHP:
mail($to, $subject, $message);
So is it possible to change these Javascript variables into PHP variables? Or is there a better way to send the email using Javascritp? Thanks in advance!