Highlighted

HTML form + PHP does not match

Explorer ,
Mar 30, 2018

Copy link to clipboard

Copied

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!

Views

163

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

HTML form + PHP does not match

Explorer ,
Mar 30, 2018

Copy link to clipboard

Copied

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!

Views

164

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 30, 2018 0
Adobe Community Professional ,
Mar 30, 2018

Copy link to clipboard

Copied

Have a look at PHP mail() Function


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 30, 2018 1