A
A
Anastasia Dementieva2015-10-12 16:14:11
PHP
Anastasia Dementieva, 2015-10-12 16:14:11

How to make the text "Message sent" after sending a letter to the mail displayed in the right place and disappear after a couple of seconds?

<form  method="POST"  name="form1" id="forma"> 
<h1> Задайте нам вопрос </h1>
<p>Заполните форму</br> и Мы с Вами свяжемся!</p>
<input name="name" placeholder="Ваше имя" type="text" class="first_name">
<input name="email" placeholder="Email " type="email" class="email_name">
<textarea name="message" class="comment" rows="8" cols="1" style="width:98%" placeholder="Ваще сообщение...">  </textarea>
<input name="send" type="submit" value="Отправить" class="submits">
</form>
<?php
if (isset($_POST['send'])){
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST[ 'email'])) {$email = $_POST['email'];}
if (isset($_POST['message'])) {$message = $_POST['message'];}
$address = '. [email protected]';
$sub = "Message from the site";
$mes = "The author gave his name: $name \n\n Specified his address: $email \n\n Message content:
$message";
$verify = mail ($address,$sub,$mes,"Content-type:text/plain; charset =
UTF-8\r\nFrom:$email");
if ($verify) echo "Message sent";
else echo"
I found this script on the net, everything works, only the sending message pops up in the upper left corner of the browser, but I need where the form itself, I almost don’t know php, please help. Help me please)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Io, 2015-10-12
@vawsan

Due to the fact that the form itself is not presented here, we will not be able to tell you where to insert the notification.
But there was a very similar question today, where I gave a link to detailed instructions with a form and an alert: https://toster.ru/answer?answer_id=677034#answers_...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question