Ir para conteúdo
Fórum Script Brasil

Fehdead

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que Fehdead postou

  1. Fehdead

    Duvida php

    Galera boa tarde antes de tudo me desculpem se postei no lugar errado, sou novo no forum estou com um problema, preciso fazer uma linha onde há 6 tabelas para digitar no max 2 numeros, e se o usuario precisar criar o numero de tabelas que quiser ou removelas. enfim, a parte das tabelas e da criacão de tabelas eu consegui fazer usando este tutorlal http://www.mauriciofaustino.com/2009/04/adicionar-campos-dinamicos/ esses numeros serão enviados para um email, só que na hora de enviar ele só envia os numeros da primeira tabela e se eu colocar mais tabelas o email não chega. alguém poderia me ajudar ? grato desde já, obrigado. Meu HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <style> .numeroform {width: 20px;} </style> </head> <body> <form action="php.php" method="post" enctype="multipart/form-data"> <legend>Insira os numeros:</legend> <div class="telefones"> <p class="campoTelefone"> <label> <input type="text" class="numeroform" name="1" maxlength="2" /> <input type="text" class="numeroform" name="2" maxlength="2" /> <input type="text" class="numeroform" name="3" maxlength="2" /> <input type="text" class="numeroform" name="4" maxlength="2" /> <input type="text" class="numeroform" name="5" maxlength="2" /> <input type="text" class="numeroform" name="6" maxlength="2" /> </label> <a href="#" class="removerCampo">Removero</a> </p> </div> <p> <a href="#" class="adicionarCampo">Adicionar</a> </p> <input type="submit"> </form> </body> </html> Meu javascrit $(function () { function removeCampo() { $(".removerCampo").unbind("click"); $(".removerCampo").bind("click", function () { i=0; $(".telefones p.campoTelefone").each(function () { i++; }); if (i>1) { $(this).parent().remove(); } }); } removeCampo(); $(".adicionarCampo").click(function () { novoCampo = $(".telefones p.campoTelefone:first").clone(); novoCampo.find("input").val(""); novoCampo.insertAfter(".telefones p.campoTelefone:last"); removeCampo(); }); }); meu PHP <?php $nomeremetente = $_POST['nomeremetente']; $emailremetente = trim($_POST['emailremetente']); $emaildestinatario = 'felipe_julio@live.com'; $jogo1 = $_POST['jogo1']; $jogo2 = $_POST['jogo2']; $jogo3 = $_POST['jogo3']; $jogo4 = $_POST['jogo4']; $jogo5 = $_POST['jogo5']; $jogo6 = $_POST['jogo6']; $mensagemHTML = '<P>Formulário preenchido no site www.eletronicamor.com.br</P> <p><b>Jogo:</b> '.$jogo1.' - '.$jogo2.' - '.$jogo3.' - '.$jogo4.' - '.$jogo5.' - '.$jogo6.'</p> <hr>'; $headers = "MIME-Version: 1.1\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "From: felipe_julio@live.com\r\n"; // remetente $headers .= "Return-Path: $emailremetente\r\n"; // return-path $envio = mail($emaildestinatario, $nomeremetente, $mensagemHTML, $headers); $assunto = $_POST['$nomeremetente']; $mensagem2 = "<p>Olá <strong>" . $nomeremetente . "</strong>.<p> mensagem <br /> mensagem </p><br><p> mensagem </p><br>"; $mensagem2 .= "<p>Atenciosamente<br /> nome aqui </p>"; $envia = mail($emailremetente ,"Agradecemos sua visita ao nosso site",$mensagem2,$headers); echo '<script> window.location="index.html"; </script>&barinvert;'; ?>
×
×
  • Criar Novo...