0
I need help. I have a contact form working but the name, email and message of the sender does not reach the email of the recipient. Where is the error in php? Since my thank you.
PHP
<?
$nome=$_POST['nome'];
$email=$_POST['email'];
$titulo=$_POST['titulo'];
$texto=$_POST['texto'];
$Destinatario="email a receber";
$Titulo="$titulo";
$mensagem1="
Uma mensagem vinda do site !
Algum vistante mandou essa mensagem pelo site.
Nome: $nome
Email: $email
Mensagem: $texto";
mail("$Destinatario","$Titulo", "$mensagem1","From:$email");
?>
Html code
<form method="post" action="contacto.php">
<input type="text" placeholder="Nome" required="">
<input type="text" placeholder="Email " required="" >
<textarea placeholder="Mensagem" requried=""></textarea>
<label class="hvr-sweep-to-right">
<input type="submit" value="Enviar">
</label>
</form>
Improve your question and put your code both html and PHP.
– user46523
It might help you. ---> http://answall.com/questions/122488/formul%C3%A1rio-de-contact-n%C3%A3o-funciona-php/122578
– Igor Mello
exchange the
<?
by <?phpe o mail() faça assim,
if(!mail("$Destinatario","$Titulo", "$mensagem1","From:$email")){ echo 'error '. error_get_last();}`– rray
Thank you Igor but it did not help. The code that is in the post you recommended also tried, among others and no gives. All say email sent to the user but the truth is that I do not receive anything in my mail. OK I’ve seen your suggestion. I will try
– Victor Emanuel
rray, unfortunately did not give
– Victor Emanuel
Have you looked in the box span?
– Igor Mello
Yes Igor, I’ve seen it and nothing.
– Victor Emanuel
This is what appears in the mail: A message coming from the site ! Some visitor sent this message through the site. Name: Email: Message:
– Victor Emanuel