There is a line for entering text, a send button, variables: $ mail - to PHP var mailjava -on Javascript How to connect so that when entering text it is recorded as a variable value at least $ mail, at least mailjava - the main thing is to register and how to do it so that a letter containing this text (variable) is sent to a@bk.ru e-mail

  • 3
    It is not a question, it is a collection of words. Explain humanly. - Elime

1 answer 1

<?php if(isset($_POST['text'])){ $mail = $_POST['text']; mail("a@bk.ru", "Заголовок", $mail); }else{ <form action="" method="post"> <input type="text" name="text"><br/> <input type="submit" name="send" value="Отправить"><br/> </form> } ?> 

If I understand correctly, but what's the javascript?