Hello. When you click on the "Call me back" button, you are redirected to the blank page site.ru/send.php
How to make, that without reloading the page just below the message “sent” was added?
Content send.php
<?php if((isset($_POST['phone'])&&$_POST['phone']!="")){ //Проверка отправилось ли наше поля name и не пустые ли они $to = 'test@test.com'; //Почта получателя, через запятую можно указать сколько угодно адресов $subject = 'Обратный звонок'; //Загаловок сообщения $message = ' <html> <head> <title>'.$subject.'</title> </head> <body> <p>Телефон: '.$_POST['phone'].'</p> </body> </html>'; //Текст нащего сообщения можно использовать HTML теги $headers = "Content-type: text/html; charset=utf-8 \r\n"; //Кодировка письма $headers .= "From: Отправитель <test@test.com>\r\n"; //Наименование и почта отправителя mail($to, $subject, $message, $headers); //Отправка письма с помощью функции mail echo '<script>alert("Сообщение отправлено")</script>'; } ?> <form action="send.php" method="post" class="form"> <input placeholder="Номер телефона" required/> <button type="submit">Перезвоните мне</button> </form> 
messageclass style - Dmitriy Kondratiuk