A
A
ART42017-11-14 23:37:52
PHP
ART4, 2017-11-14 23:37:52

How to display a notification after sending an email?

There is a code

$send = mail ($address,$sub,$mes,"Content-type: text/html; charset = UTF-8\r\nFrom:$address");
if ($send == 'true')
{echo "<div style='font-size:18px;'>Сообщение отправлено успешно.</div>";}
else {echo "<div style='font-size:18px;'>Ошибка, сообщение не отправлено!</div>";}
}
else
{
echo "<div style='font-size: 18px;text-align: center;margin: 15px;'>Заполнили все поля!!!</div>";
}

How can I change it so that the output pops up in a modal window?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasyl Fomin, 2017-11-15
@fomvasss

output in a hidden html block, you can even write a js variable in a script block, and then, after loading the page, use the text that came in response to output using java scrip

M
Maxim Timofeev, 2017-11-15
@webinar

Your script is accessed by js via ajax, in response it receives a text. What is the problem? Or is the scheme different?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question