Galera... tenho um formulario em asp que ao ser enviado, ele ele grava as informações em um bando de dados.. e o codigo esta ai em baixo.
Agora eu preciso acrescentar a tag que envia o formulario preenchido para o meu e-mail. Mais isso tem que ser pelo e-mail do cara, caso ele tenha algum programa de e-mail. O codigo é esse.
Pergunta
Ronnie_Quintino
Galera... tenho um formulario em asp que ao ser enviado, ele ele grava as informações em um bando de dados.. e o codigo esta ai em baixo.
Agora eu preciso acrescentar a tag que envia o formulario preenchido para o meu e-mail. Mais isso tem que ser pelo e-mail do cara, caso ele tenha algum programa de e-mail. O codigo é esse.
<html> <script language="JavaScript"> function dadosok() { var texto, mensagem, erro; mensagem = 'Campos incompletos .....' erro=false; // teste campo nome texto = document.fale.nome.value; if (texto.length == 0) { mensagem+='\n- nome'; erro=true; } // teste campo mensagem texto = document.fale.endereco.value; if (texto.length == 0) { mensagem+='\n- endereço'; erro=true; } // teste campo mensagem texto = document.fale.bairro.value; if (texto.length == 0) { mensagem+='\n- bairro'; erro=true; } // teste campo mensagem texto = document.fale.cidade.value; if (texto.length == 0) { mensagem+='\n- cidade'; erro=true; } // teste campo mensagem texto = document.fale.cep.value; if (texto.length == 0) { mensagem+='\n- cep'; erro=true; } // teste campo email texto = document.fale.email.value; if (texto.length == 0) { mensagem+='\n- e-mail'; erro=true; } // teste campo telefone texto = document.fale.telefone.value; if (texto.length == 0) { mensagem+='\n- telefone'; erro=true; } // teste campo mensagem texto = document.fale.ddd.value; if (texto.length == 0) { mensagem+='\n- ddd'; erro=true; } if (erro) alert(mensagem); else ; return !(erro); } </script> <head> <title>Naturallook</title> </head> <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0"> <p align="center"><img border="0" src="logo.gif" width="235" height="55"></p> <FORM name="fale" METHOD=POST ACTION="http://www2.meu banco de dados" onsubmit="return dadosok();"> <div align="center"> <center> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="58%" id="AutoNumber1" height="165"> <tr> <td width="100%" height="165"> <div align="center"> <center> <table border="0" width="69%" cellspacing="0" cellpadding="0" height="177"> <tr> <td width="97%" height="131"> <table border="0" width="344" cellspacing="0" cellpadding="0" height="147"> <tr> <td width="18" height="3"> </td> <td width="47" height="3" bgcolor="#EAEAEA"> <font face="Arial" size="1">Como nos conheceu?</font></td> <td width="294" height="3"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="108%" id="AutoNumber3"> <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%" id="AutoNumber4"> <tr> <td width="18%"> <select name="tv" size=1 id="tv" style="font-size: 8 pt; font-family: Arial"> <option selected value=""> TV <option value="Gazeta">Gazeta <option value="Globo">Globo <option value="SBT">SBT <option value="Rede TV">Rede TV <option value="Bandeirantes">Bandeirantes <option value="Record">Record <option value="Canal 21">Canal 21 </select></td> <td width="42%"> <select name="internet" size="1" id="internet" style="font-size: 8 pt; font-family: Arial"> <option selected value="">Internet <option>Aonde</option> <option>Cadê?</option> <option>Google</option> <option>Radar UOL</option> <option>Surf</option> <option>Yahoo!</option> <option>Zeek</option> </select></td> <td width="9%"> <p align="left"> <select name="revistas" size="1" id="revistas" style="font-family: Arial; font-size: 8 pt"> <option selected value="">Revistas <option>Caras</option> <option>Época</option> <option>Isto É</option> <option>Veja</option> <option>Jornais</option> </select></td> <td width="36%"> <select name="indicacoes" size="1" id="indicacoes" style="font-family: Arial; font-size: 8 pt"> <option selected value="">Indicações <option>Amigo</option> <option>Cliente</option> <option>Funcionário</option> </select></td> </tr> </table> </td> </tr> <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="97%" id="AutoNumber5"> <tr> <td width="18%"><font face="Arial" size="1"> Outros:</font></td> <td width="7%"> <font color="#FFFFFF"><b> <input name="outros" type="checkbox" id="outros" value="outros"> </b></font></td> <td width="21%"><font face="Arial" size="1">Comentários:</font></td> <td width="54%"> <font size="1" face="Arial"> <input type="text" name="comentarios" size="22" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"></td> <td width="294" height="3"> </td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font face="Arial" size="1"> *Nome:</font></td> <td width="294" height="3"> <font size="1" face="Arial"> <input type="text" name="nome" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"> </font> </td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font face="Arial" size="1"> *Endereço:</font></td> <td width="294" height="3"> <font face="Arial" size="1"> <input type="text" name="endereco" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font face="Arial" size="1">*Bairro:</font></td> <td width="294" height="3"> <font face="Arial" size="1"> <input type="text" name="bairro" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font size="1" face="Arial">*Cidade:</font></td> <td width="294" height="3"> <font face="Arial" size="1"> <input type="text" name="cidade" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font face="Arial" size="1"> *Estado:</font></td> <td width="294" height="3"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6"> <tr> <td width="15%"> <font face="Arial" size="1"> <select name="estado" class="dados" size="1" style="font-family: Arial; font-size: 8 pt; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"> <option value="SP">SP</option> <option value="AC">AC</option> <option value="AL">AL</option> <option value="AM">AM</option> <option value="AP">AP</option> <option value="BA">BA</option> <option value="CE">CE</option> <option value="DF">DF</option> <option value="ES">ES</option> <option value="GO">GO</option> <option value="MA">MA</option> <option value="MG">MG</option> <option value="MS">MS</option> <option value="MT">MT</option> <option value="PA">PA</option> <option value="PB">PB</option> <option value="PE">PE</option> <option value="PI">PI</option> <option value="PR">PR</option> <option value="RJ">RJ</option> <option value="RN">RN</option> <option value="RO">RO</option> <option value="RR">RR</option> <option value="RS">RS</option> <option value="SC">SC</option> <option value="SE">SE</option> <option value="TO">TO</option> </select></font></td> <td width="12%"><font face="Arial" size="1">Idade:</font></td> <td width="48%"><font color="#FFFFFF"><b> <select name="idade" id="idade"> <option>18 anos</option> <option>19 a 25 anos</option> <option>26 a 35 anos</option> <option>35 a 45 anos</option> <option>acima de 50 anos</option> </select></b></font></td> <td width="25%"> </td> </tr> </table> </td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font face="Arial" size="1">*Profissão:</font></td> <td width="294" height="3"> <font face="Arial" size="1"> <input type="text" name="profissao" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="3"> </td> <td width="47" height="3"><font size="1" face="Arial">*Cep:</font></td> <td width="294" height="3"> <font face="Arial" size="1"> <input type="text" name="cep" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="2"> </td> <td width="47" height="2"><font size="1" face="Arial">*E-mail:</font></td> <td width="294" height="2"> <font face="Arial" size="1"> <input type="text" name="email" size="40" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> </tr> <tr> <td width="18" height="2"> </td> <td width="47" height="2"><font face="Arial" size="1"> *Telefone:</font></td> <td width="294" height="2"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="101%" id="AutoNumber2"> <tr> <td width="25%"> <font face="Arial" size="1"> <input type="text" name="telefone" size="15" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td> <td width="2%"> </td> <td width="20%"> <p align="left"><font face="Arial" size="1">*DDD:</font></td> <td width="54%"> <font face="Arial" size="1"> <input name="ddd" size="15" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; float:left"></font></td> </tr> </table> </td> </tr> <tr> <td width="18" height="2"> </td> <td width="47" height="2"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber7"> <tr> <td width="50%"><font size="1" face="Arial">SIM</font></td> <td width="50%"><strong><font color="#0000FF"> <input type="radio" name="quero_receber" value="quero_receber" checked> </font></strong></td> </tr> </table> </td> <td width="294" height="2"> <font face="Arial" size="1">Quero receber INTEIRAMENTE GRÁTIS o material explicativo da "Natural Look"</font></td> </tr> <tr> <td width="18" height="1"></td> <td width="343" height="1" colspan="2" valign="middle" align="center"><a href="#"> <font face="Arial" size="1"><input type="image" src="enviar.gif" border="0" onclick="submit" width="56" height="13"></font></form></a></td> </tr> </table> </td> </tr> </table> </center> </div> </td> </tr> </table> </center> </div> </center> </div> <p> </p> </body> </html>Adicionado CODE pelo moderador !!!
Editado por Ronnie_QuintinoLink para o comentário
Compartilhar em outros sites
6 respostass a esta questão
Posts Recomendados
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.