Ir para conteúdo
Fórum Script Brasil
  • 0

Formulário envia cadastro mas não aparece nada no e-mail que recebe.


monicafmonteiro

Pergunta

Boa noite.

Sou mais que iniciante no PHP, e estou penando pra resolver um problema.

Fiz o formulário , e o php para envio da resposta , ele faz tudo direitinho

mas quando e-mail chega ao destino não aparece . Gostaria de pedir pra

um de vocês me mostrar onde está o erro.

Desde já agradeço muito a ajuda.

Abraços.

<?PHP
  $fm_name = $_REQUEST[fm_name];
  list($fm_email,$junk) = split("\n",$_REQUEST[fm_email]);
  $fm_subject = $_REQUEST[fm_subject];
  $fm_body = $_REQUEST[fm_body];
  $fm_address = $_REQUEST[fm_address];
  if (isset($_REQUEST[email]) && $_REQUEST[email] != "" && !isset($_REQUEST[fm_address]))
  {
    $fm_address = $_REQUEST[email];
  }
  $addresses = array('fotopasseios@fotopasseios.com.br');
  if (!in_array($fm_address, $addresses))
  {
    $fm_address = $addresses[0];
  }

  $headers = "From: $fm_email\n"; 
  $headers .= "X-FormMail-User: fotopasseios@fotopasseios.com.br\n"; 
  $subject = "iBizPanel Form Mail Post"; 
  $ip_addr = $_SERVER["REMOTE_ADDR"];
  $date = date("D M j Y G:i:s T");
  $body = "IP Address: $ip_addr\nDate: $date\nName: $fm_name\nEmail: $fm_email\ntelefone: $fm_name\ncelular: $fm_name\nend: $fm_name\ncomplemento: $fm_name\ncidade/estado: $fm_name\nCep:  $fm_name\nDatadenascimento: $fm_name\nmensagem: $fm_body";

  mail($fm_address,$subject,$body,$headers);

  $return_url = "http://fotopasseios.com.br/";
  if (isset($_REQUEST[fm_return]) && $_REQUEST[fm_return] != "")
  {
    $return_url = $_REQUEST[fm_return];
  }
?>
<html>
<head>
<meta http-equiv="Refresh" content="2; URL=<?PHP echo $return_url ?>"> 
<title>.:. Fotopasseios .:. </title>
</head>
<body bgcolor="white">
<div align="center">
<br><br>
<font size="4">Obrigado pelo Cadastro!!!</font></div>
</body>
</html>

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0
<!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>.:. Fotopasseios .:.</title>
<style type="text/css">
<!--
body {
	background-image: url(fundo.jpg);
	background-repeat: repeat;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
#apDiv1 {
	position:absolute;
	left:387px;
	top:343px;
	width:474px;
	height:237px;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:356px;
	top:312px;
	width:1px;
	height:16px;
	z-index:2;
}
#apDiv3 {
	position:absolute;
	left:393px;
	top:429px;
	width:494px;
	height:164px;
	z-index:1;
}
#apDiv4 {
	position:absolute;
	left:384px;
	top:396px;
	width:474px;
	height:172px;
	z-index:1;
}
#apDiv5 {
	position:absolute;
	left:370px;
	top:351px;
	width:636px;
	height:412px;
	z-index:1;
}
.style5 {
	font-family: Angelina;
	font-size: 24px;
	color: #003300;
}
.style6 {
	font-family: Angelina;
	font-size: 24px;
}
-->
</style></head>

<body>
<div id="apDiv5">
  <table width="84%">
    <tr>
      <td><form id="form1" name="form1" method="post" action="http://fotopasseios.com.br/fmSimplecadastro.php"><br />
        <span class="style5">Nome
        <label>
          <input name="Nome" type="text" id="Nome" size="55" />
          </label>
        <br />

        E-mail
        <label>
        <input name="E-mail" type="text" id="E-mail" size="55" />
        </label>
        <br />
        Telefone 
        <label>
        <input type="text" name="telefone" id="telefone" />
        </label> 
        Celular 
        <label>
        <input type="text" name="textfield" id="textfield" />
        </label>
        <br />
        End.
        <label>
        <input name="End" type="text" id="End" size="57" />
        </label>
        <br />
        </span><span class="style6">Complemento</span>        
          <input name="Compelmento" type="text" id="Compelmento" size="47" />
          </label>
          <br />
          <span class="style6">Cidade/Estado
          <input name="Cidade/Estado" type="text" id="Cidade/Estado" size="46" />
          <br />
          CEP 
          <label>
          <input type="text" name="CEP" id="CEP" />
          </label> 
          Data de Nascimento 
          <label>
          <input type="text" name="Datadenascimento" id="Datadenascimento" />
          <br />
          </label>
          <label></label>
          <br />Mensagem</span>          </span><br />
          <textarea name="mensagem" id="mensagem" cols="45" rows="3"></textarea>
          </label>
        <p>
          <input type="hidden" name="fm_return" value="" />
          <input type="hidden" name="fm_address" value="fotopasseios@fotopasseios.com.br" />
          <input type="submit" name="SendEmail" value="Enviar" />
</p>
        <p>&nbsp;</p>
      </form>      </td>
    </tr>

    <tr>
      <td align="left">&nbsp;</td>
    </tr>
  </table>
</div>
<table width="200" border="0" align="center">
  <tr>
    <td><table border="0" cellpadding="0" cellspacing="0" width="1024">
      <!-- fwtable fwsrc="Sem título" fwbase="cadastro.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
      <tr>
        <td><img src="imagens/spacer.gif" width="245" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="39" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="58" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="57" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="68" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="69" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="90" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="35" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="72" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="38" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="253" height="1" border="0" alt="" /></td>
        <td><img src="imagens/spacer.gif" width="1" height="1" border="0" alt="" /></td>
      </tr>
      <tr>
        <td colspan="11"><img src="imagens/cadastro_r1_c1.jpg" alt="" name="cadastro_r1_c1" width="1024" height="202" border="0" id="cadastro_r1_c1" /></td>
        <td><img src="imagens/spacer.gif" width="1" height="202" border="0" alt="" /></td>
      </tr>
      <tr>
        <td colspan="2"><img src="imagens/cadastro_r2_c1.jpg" alt="" name="cadastro_r2_c1" width="284" height="37" border="0" id="cadastro_r2_c1" /></td>
        <td colspan="2"><a href="index.html"><img src="imagens/cadastro_r2_c3.jpg" alt="" name="cadastro_r2_c3" width="115" height="37" border="0" id="cadastro_r2_c3" /></a></td>
        <td colspan="2"><a href="fotografos.html"><img src="imagens/cadastro_r2_c5.jpg" alt="" name="cadastro_r2_c5" width="137" height="37" border="0" id="cadastro_r2_c5" /></a></td>
        <td><a href="dicas.html"><img src="imagens/cadastro_r2_c7.jpg" alt="" name="cadastro_r2_c7" width="90" height="37" border="0" id="cadastro_r2_c7" /></a></td>
        <td colspan="2"><a href="albuns.html"><img src="imagens/cadastro_r2_c8.jpg" alt="" name="cadastro_r2_c8" width="107" height="37" border="0" id="cadastro_r2_c8" /></a></td>
        <td colspan="2"><img src="imagens/cadastro_r2_c10.jpg" alt="" name="cadastro_r2_c10" width="291" height="37" border="0" id="cadastro_r2_c10" /></td>
        <td><img src="imagens/spacer.gif" width="1" height="37" border="0" alt="" /></td>
      </tr>
      <tr>
        <td rowspan="2"><img src="imagens/cadastro_r3_c1.jpg" alt="" name="cadastro_r3_c1" width="245" height="575" border="0" id="cadastro_r3_c1" /></td>
        <td colspan="2"><a href="links.html"><img src="imagens/cadastro_r3_c2.jpg" alt="" name="cadastro_r3_c2" width="97" height="39" border="0" id="cadastro_r3_c2" /></a></td>
        <td colspan="2"><a href="cadastro.html"><img src="imagens/cadastro_r3_c4.jpg" alt="" name="cadastro_r3_c4" width="125" height="39" border="0" id="cadastro_r3_c4" /></a></td>
        <td colspan="3"><a href="programacao.html"><img src="imagens/cadastro_r3_c6.jpg" alt="" name="cadastro_r3_c6" width="194" height="39" border="0" id="cadastro_r3_c6" /></a></td>
        <td colspan="2"><a href="contato.html"><img src="imagens/cadastro_r3_c9.jpg" alt="" name="cadastro_r3_c9" width="110" height="39" border="0" id="cadastro_r3_c9" /></a></td>
        <td rowspan="2"><img src="imagens/cadastro_r3_c11.jpg" alt="" name="cadastro_r3_c11" width="253" height="575" border="0" id="cadastro_r3_c11" /></td>
        <td><img src="imagens/spacer.gif" width="1" height="39" border="0" alt="" /></td>
      </tr>
      <tr>
        <td colspan="9"><img src="imagens/cadastro_r4_c2.jpg" alt="" name="cadastro_r4_c2" width="526" height="536" border="0" id="cadastro_r4_c2" /></td>
        <td><img src="imagens/spacer.gif" width="1" height="536" border="0" alt="" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

Link para o comentário
Compartilhar em outros sites

  • 0

O código é o lá de cima...

O que está acontecendo é que no resgate das variáveis você deve usar o mesmo nome usado no campo do formulário, exemplo:

<input name="Nome" type="text" id="Nome" size="55" />

Na hora de resgatar você está usando:

$fm_name = $_REQUEST[fm_name];

No caso o correto seria:

$fm_name = $_REQUEST['Nome']; //Pois Nome é o nome do campo no formulário...

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...