Jump to content


Photo

Problema Com Envio De Formulário Por E-mail


  • Faça o login para participar
2 replies to this topic

#1 Vandy_WM

Vandy_WM

    Novato no fórum

  • Usuários
  • 23 posts
  • Sexo:Não informado

Posted 24/09/2008, 15:22

Olá pessoal, sou iniciante no ramo de php e estou com um problemão quanto e enviar um formulári opor e-mail no meu site...
Vo colocar as duas paginas do envio aqui embaixo e quem puder corrigir ou pelo menos me dar alguma dica eu fikarei muito grato...

Página contato.php

<!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"><!-- InstanceBegin template="/Templates/template_teste.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>site</title>
<style type="text/css">
<!--
body {
	background-image: url(../fundo2.png);
}
#apDiv1 {
	position:absolute;
	left:31.5%;
	top:354px;
	width:531px;
	height:568px;
	background-image:;
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:31.5%;
	top:429px;
	width:98px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv3 {
	position:absolute;
	left:15%;
	top:374px;
	width:89px;
	height:22px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv4 {
	position:absolute;
	left:15%;
	top:411px;
	width:91px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:3;
}
-->
</style></head>

<body>
<table align="center">
<tr>
<td>
<div id="apDiv1"><!-- InstanceBeginEditable name="EditRegion1" -->
  <p align="center" style="font-family: Univers; font-size: 13px">Você pode nos encontrar no seguinte endereço:</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Rua Cambará do Sul, Nº 26<br />
	Bairro União - Dois Irmãos - RS</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Ou pelos seguintes telefones: <br />
	  <br />
	(51)3564-2413<br />
	ou<br />
	(51)3564-1694</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> </p>
  <p align="center" style="font-family: Univers; font-size: 13px">Você também pode nos contatar pelo serviço de e-mail abaixo.</p>
  <div align="center"></div>
  <div align="center"></div>
  <div align="center"></div>
  <table width="294" border="0">
	<tr>
	  <td width="57"><span style="font-family: Univers; font-size: 13px">Nome</span></td>
	  <td width="227"><form id="form1" name="form1" method="post" action="contato2.php">
		<label>
		  <input type="text" name="textfield" id="textfield" />
		  </label>
	  </form>	  </td>
	</tr>
	<tr>
	  <td><span style="font-family: Univers; font-size: 13px">E-mail</span></td>
	  <td><form id="form2" name="form2" method="post" action="contato2.php">
		<label>
		  <input type="text" name="textfield2" id="textfield2" />
		  </label>
	  </form>	  </td>
	</tr>
  </table>
  <form action="contato2.php" method="post" enctype="multipart/form-data" name="enviar" class="enviar" onsubmit="return validaForm()">
	<label>
	  <div align="center">
		<textarea name="textarea" id="textarea" cols="60" rows="8"></textarea>
		</div>
	</label>
	<p align="center">
	  <label>
	  <input type="submit" name="button" id="button" value="Limpar" />
	  </label>
	  <label>
	  <input name="submit" type="submit" onclick="submitFormulario();" class="submit" value="ENVIAR"/>
	  </label>
	</p>
  </form>
  <div align="left"></div>
  <div align="center"></div>
<!-- InstanceEndEditable --></div>
<div id="apDiv3">
  <label>
  <input name="textfield" type="text" id="textfield" size="15" />
  </label>
</div>
<div id="apDiv4">
  <label>
  <input name="textfield2" type="password" id="textfield2" size="15" />
  </label>
</div>
<table width="98" border="0">
  <tr>
	<td colspan="2"><img src="../cabecalho2.png" width="768" height="320" border="0" usemap="#Map" /></td>
  </tr>
  <tr>
	<td><img src="../menu2.png" width="180" height="601" border="0" usemap="#Map2" /></td>
	<td><img src="../texto2.png" width="584" height="601" /></td>
  </tr>
  
  
  <tr>
	<td colspan="2"><img src="../rodape2.png" width="768" height="106" /></td>
  </tr>
</table>

<map name="Map" id="Map">
<area shape="rect" coords="1,230,77,254" href="index.php" />
<area shape="rect" coords="77,230,162,254" href="historico.php" />
<area shape="rect" coords="161,230,243,255" href="produtos.php" />
<area shape="rect" coords="243,231,319,254" href="precos.php" />
<area shape="rect" coords="448,231,531,256" href="instrucoes_princ_1.php" />
<area shape="rect" coords="530,231,601,255" href="artes.php" />
<area shape="rect" coords="601,231,693,255" href="duvidas.php" />
<area shape="rect" coords="693,231,765,254" href="mapa.php" />
<area shape="poly" coords="320,254,319,245,321,236,328,228,338,225,350,225,354,221,356,207,364,190,376,182,389,179,404,188,412,200,416,213,412,225,436,226,443,234,446,256" href="index.php" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="31,147,158,171" href="cadastro.php" />
<area shape="rect" coords="30,172,158,195" href="contato.php" />
<area shape="rect" coords="30,195,158,221" href="upload.php" />
<area shape="rect" coords="29,220,159,248" href="orcamentos.php" />
<area shape="rect" coords="42,101,142,118" href="login.php" />
<area shape="rect" coords="40,125,148,133" href="esq_senha.php" />
</map>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>

Página contato2.php

<!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"><!-- InstanceBegin template="/Templates/template_teste.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>site</title>
<style type="text/css">
<!--
body {
	background-image: url(../fundo2.png);
}
#apDiv1 {
	position:absolute;
	left:31.5%;
	top:354px;
	width:531px;
	height:568px;
	background-image:;
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:31.5%;
	top:429px;
	width:98px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv3 {
	position:absolute;
	left:15%;
	top:374px;
	width:89px;
	height:22px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv4 {
	position:absolute;
	left:15%;
	top:411px;
	width:91px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:3;
}
-->
</style></head>

<body>
<table align="center">
<tr>
<td>
<div id="apDiv1"><!-- InstanceBeginEditable name="EditRegion1" -->
  <p align="center" style="font-family: Univers; font-size: 13px">Você pode nos encontrar no seguinte endereço:</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Rua Cambará do Sul, Nº 26<br />
	Bairro União - Dois Irmãos - RS</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Ou pelos seguintes telefones: <br />
	  <br />
	3564-2413<br />
	ou<br />
	3564-1694</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> </p>
  <p align="center" style="font-family: Univers; font-size: 13px">Você também pode nos contatar pelo serviço de e-mail abaixo.</p>
  <div align="center"></div>
  <div align="center"></div>
  <div align="center"></div>
  <form id="form1" name="form1" method="post" action="contato.php">

<?php
$mensagem = "Nome: ".$_POST['txtnome']." \n";
$mensagem .= "Email: ".$_POST['txtemail']." \n";
$mensagem .= "Mensagem:". $_POST['txtmensagem'];

mail("email@yahoo.com.br", "form.enviar", $mensagem);

echo  'Seu contato foi enviado com sucesso!';
echo ' Em breve retornaremos sua mensagem';
?>

		</form>
  <form id="form3" name="form3" method="post" action="contato.php">
  </form>
  <div align="left"></div>
  <div align="center"></div>
<!-- InstanceEndEditable --></div>
<div id="apDiv3">
  <label>
  <input name="textfield" type="text" id="textfield" size="15" />
  </label>
</div>
<div id="apDiv4">
  <label>
  <input name="textfield2" type="password" id="textfield2" size="15" />
  </label>
</div>
<table width="98" border="0">
  <tr>
	<td colspan="2"><img src="../cabecalho2.png" width="768" height="320" border="0" usemap="#Map" /></td>
  </tr>
  <tr>
	<td><img src="../menu2.png" width="180" height="601" border="0" usemap="#Map2" /></td>
	<td><img src="../texto2.png" width="584" height="601" /></td>
  </tr>
  
  
  <tr>
	<td colspan="2"><img src="../rodape2.png" width="768" height="106" /></td>
  </tr>
</table>

<map name="Map" id="Map">
<area shape="rect" coords="1,230,77,254" href="index.php" />
<area shape="rect" coords="77,230,162,254" href="historico.php" />
<area shape="rect" coords="161,230,243,255" href="produtos.php" />
<area shape="rect" coords="243,231,319,254" href="precos.php" />
<area shape="rect" coords="448,231,531,256" href="instrucoes_princ_1.php" />
<area shape="rect" coords="530,231,601,255" href="artes.php" />
<area shape="rect" coords="601,231,693,255" href="duvidas.php" />
<area shape="rect" coords="693,231,765,254" href="mapa.php" />
<area shape="poly" coords="320,254,319,245,321,236,328,228,338,225,350,225,354,221,356,207,364,190,376,182,389,179,404,188,412,200,416,213,412,225,436,226,443,234,446,256" href="index.php" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="31,147,158,171" href="cadastro.php" />
<area shape="rect" coords="30,172,158,195" href="contato.php" />
<area shape="rect" coords="30,195,158,221" href="upload.php" />
<area shape="rect" coords="29,220,159,248" href="orcamentos.php" />
<area shape="rect" coords="42,101,142,118" href="login.php" />
<area shape="rect" coords="40,125,148,133" href="esq_senha.php" />
</map>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>

Dese já, muito obrigado...

Abraços

Edição feita por: Vandy_WM, 24/09/2008, 15:28.


#2 Rikkz Core

Rikkz Core
  • Visitantes

Posted 24/09/2008, 16:37

Sinceramente, não vou ler esse código bagunçado para procurar algum erro.
Seja mais específico, diga qual o problema está ocorrendo.

Edição feita por: Rikkz Core, 24/09/2008, 16:38.


#3 Maykel Esser

Maykel Esser

    Super Veterano

  • Usuários
  • 1536 posts
  • Sexo:Masculino
  • Localidade:Curitiba - PR

Posted 24/09/2008, 16:39

qual erro mostra?

Se este post lhe ajudou, ajude o fórum também. Use a reputação de mensagens! add.png





1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq