Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

HTML form + PHP does not match

Explorer ,
Mar 30, 2018 Mar 30, 2018

Hello users, I am facing difficulties in creating a form for a random website.

I am using HTML and a file in PHP for developing the same, codes below:

File PHP:

<!doctype html>

<html>

<head>

<meta http-equiv="Content-Type" content="txt/html; charset=iso-8859-1">

</head>

<body>

<?php

     $mensagem = "Nome: ".$_POST['nome']." \n";

     $mensagem = "Email: ".$_POST['email']." \n";

     $mensagem = "Assunto: ".$_POST['assunto']." \n";

     $mensagem = "Mensagem: ".$_POST['mensagem'].

     mail("helpcelere@gmail.com", "Suporte Célere", $mensagem);

?>

</body>

</html>

File HTML:

<form action="contato_file.php" method="post" enctype="multipart/form-data" name="formulario_contato" id= "formulario_contato" align="center">

    <input name="nome" type="text" id="nome" form="formulario_contato" placeholder="Nome" size="35" />

    <br />

    <input name="email" type="text" id="email" form="formulario_contato" placeholder="E-mail" size="35" />

    <br />

    <input name="assunto" type="text" id="assunto" form="formulario_contato" placeholder="Assunto" size="35" />

    <br />

    <textarea name="mensagem" cols="45" rows="5" id="mensagem" form="formulario_contato" placeholder="Digite sua mensagem"></textarea>

    <br />

    <button type="submit" form="formulario_contato" value="Enviar">Enviar</button>

  </form>

When I press the send button, it points to the "contact_file.php" page, however, the email with the filled fields of the form does not arrive in the email described "helpcelere@gmail.com".

can anybody help me? Thankful!

326
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2018 Mar 30, 2018
LATEST

Have a look at PHP mail() Function

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines