Jump to content
Fórum Script Brasil
  • 0

Formulario PHP não abstrai os dados corretamente e envia para meu email



Bom tenho um form, mais não sei identificar o erro, quando o php abstrai os dados do html ele apenas envia para meu email o campo email prenchido o resto fica assim:

Nome: E-mail: [email protected] Telefone: Mensagem:

Gostaria de uma ajuda

Whatsapp 11 956472141

Skype [email protected]

Trecho html:

<div id="content" class="pageContato">
                    <div class="row">
                        <div class="small-12 large-5 columns">
                            <dl class="tabs title support">
                                <dd class="active"><a href="#contato">CONTATO</a></dd>
                                <!-- <dd><a href="#suporte">SUPORTE</a></dd> -->
                            <div class="sep"></div>

                            <ul class="tabs-content">
                                <li class="active" id="contatoTab">

                                    <form id="form-contato" action="envia_contato.php" method="POST" class="form-contato">

                                        <label for="name">Nome<span class="required">*</span></label>

                                        <input type="text" id="name" name="name" class="required" value=""/>
                                        <span class="error" for="name">

                                        <label for="email">Email<span class="required">*</span></label>
                                        <input type="email" name="email" id="email" class="required" value=""/>
                                        <span class="error" for="email">

                                        <label for="phone">Telefone<span class="required">*</span></label>
                                        <input type="text" name="phone" id="phone" class="required" value=""/>
                                        <span class="error" for="phone">

                                        <label for="subject">Assunto<span class="required">*</span></label>
                                        <input type="text" name="subject" id="subject" class="required" value=""/>
                                        <span class="error" for="subject">

                                        <label for="message">Mensagem<span class="required">*</span></label>
                                        <textarea name="message" id="message" cols="30" rows="10" class="required"></textarea>
                                        <span class="error" for="message">

                                        <label for="input-captcha">Digite o texto abaixo<span class="required">*</span></label>
                                        <img id="captcha" src="captcha/captcha.png" alt="" />
                                        <input type="text" name="Captcha" id="input-captcha" class="required input-captcha" value="" /><br><br>

                                        <button class="radius alert button button-submit ">Enviar</button>




Trecho Php:


<title>Enviando e-mail...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="refresh" content="01;URL=http://agenciaguelfi.com.br/index.html">

$subject = $_POST['assunto'];
$name = $_POST['nome'];
$email = $_POST['email'];
$phone = $_POST['telefone'];
$message = $_POST['observacoes'];
$header = "Content-Type: text/html; charset= utf-8";
$to = "[email protected].com.br,[email protected].com";
$message =
"Nome: $name
E-mail: $email
Telefone: $phone
Mensagem: $message ";

echo"Mensagem <strong>enviada</strong> </br></br> <strong>Entraremos em contato em breve!</strong>";

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...