olá bom dia, Script Brasil Estou precisando de um help! Tenho um formulário que tem função de enviar mensagem para e-mails configurados e responder automáticamente na página do formulário e enviar uma mensagem automática para email colocado no formulário. Veja e teste: hotelmontevideu.com/contato.html (após enviar mensagem ele aparece uma mensagem automática, dizendo que mensagem foi enviada com sucesso) Mas aparece em um página em branco, como faço para adaptar essa resposta no style.css ? obrigado! ___ Código página do formulário(contato.html): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Hotel Montevidéu</title>
<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
<style type="text/css">
<!--
body,td,th {
font-family: verdana;
}
-->
</style></head>
<body>
<div id="wrapper">
<div id="header"> </div>
<div id="left">
<div id="logo">
<h1>Hotel Montevidéu </h1>
<p>Seja Bem Vindo!!</p>
</div>
<div id="nav">
<ul>
<li class="important"><a href="index.html">Home</a></li>
<li><a href="fotos.html">Fotos</a></li>
<li><a href="tarifas.html">Tarifas</a></li>
<li><a href="cidade.html">Cidade</a></li>
<li><a href="eventos.html">Eventos</a></li>
<li><a href="local.html">Localidade</a></li>
<li><a href="contato.html">Contato</a></li>
</ul>
</div>
<div id="news">
<iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=2615&SKIN=padrão' scrolling='no' frameborder='0' width=150 height='170' marginheight='0' marginwidth='0'></iframe>
</div>
<div id="support">
<p> </p>
</div>
</div>
<div id="right">
<h2>Contato</h2>
<p>Endereço: Rodovia BR 482 KM 93 Balança, CEP: 29560-000 Guaçuí-Espírito Santo.</p>
<p>Telefone: 28 3553 2002</p>
<p>Fax: 28 3553 2093</p>
<p>Email: contato@hotelmontevideu.com</p>
<p>Envie sua Mensagem</p>
<title>Formulario</title></head>
<body>
<form action="email.php" method="post" name="form1" id="form1">
<table width="39%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><span class="texto">Nome:</span><br />
<input name="nome" type="text" class="form_campos" value="" size="30" /></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><span class="texto">E-mail:</span><br />
<input name="email" type="text" class="form_campos" value="" size="30" /></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><span class="texto">Cidade:</span><br />
<input name="cidade" type="text" class="form_campos" value="" size="30" id="cidade" /></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><span class="texto">Estado:</span><br />
<input name="nome3" type="text" class="form_campos" value="" size="30" /></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><span class="texto">Assunto:</span><br />
<input name="assunto" type="text" class="form_campos" value="" size="30" id="assunto" /></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><span class="texto">Mensagem:</span><br />
<textarea name="mensagem" cols="40" rows="4" class="form_campos"></textarea></td>
</tr>
<tr>
<td><img src="images/spacer.png" width="1" height="10" /></td>
</tr>
<tr>
<td><input name="enviar" type="submit" class="form_botao" value=" Enviar " id="enviar" />
<input name="limpar" type="reset" class="form_botao" value=" Limpar " id="limpar" /></td>
</tr>
</table>
</form>
</body>
</html>
</div>
<div class="clear"> </div>
<div id="spacer"> </div>
<div id="footer">
<div id="copyright">
Copyright © 2009 Hotel Montevidéu - Todos os direitos reservado.</div>
<div id="footerline"></div>
</div>
</div>
</body>
</html>
___
Syle usado (CSS):
html, body, h1, h2, h3, h4, ul, li {
margin: 0;
padding: 0;
}
h1 img {
display: block;
}
img {
border: 0;
}
a {
color: #464544;
}
a:hover {
color: #FFA405;
}
.left {
float: left;
}
.right {
float: right;
}
.more {
text-align: right;
}
.clear {
clear: both;
}
body {
background: #E0D5B7 url(images/page_bg.jpg) repeat-x;
text-align: center;
font: 11px verdana, arial, sans-serif;
color: #74653D;
padding-bottom: 10px;
padding-top: 31px;
}
/** layout **/
#wrapper {
text-align: left;
margin: auto;
width: 778px;
position: relative;
background: url(images/body_bg.gif) repeat-y;
}
#header {
position: absolute;
top: 0;
left: 243px;
width: 535px;
height: 279px;
background: url(images/header_2.jpg) no-repeat;
}
#left {
float: left;
width: 243px;
}
#logo {
width: 244px;
height: 152px;
background: url(images/header_1.jpg) no-repeat;
text-align: center;
color: #595959;
}
#logo h1 {
padding-top: 30px;
font: 24px "arial narrow", arial, sans-serif;
}
#logo p {
margin: 8px 25px 4px 25px;
border-top: 1px solid #B8B8B8;
border-bottom: 1px solid #B8B8B8;
padding: 3px;
letter-spacing: 0.2em;
font-weight: bold;
}
#nav {
background: url(images/nav_left.jpg) no-repeat;
}
#nav ul {
margin-left: 9px;
padding-left: 1px;
padding-bottom: 29px;
background: #2A2A2A bottom left url(images/nav_bot.jpg) no-repeat;
}
#nav li {
list-style: none;
border-top: 1px solid #959595;
background: 188px 10px url(images/arr_white.gif) no-repeat;
padding: 7px 0 0 31px;
font-family: Verdana, Geneva, sans-serif;
font-size: 14px;
}
#nav a {
color: #fff;
text-decoration: none;
border-left: 1px solid #959595;
padding-left: 10px;
display: block;
width: 90%;
padding: 2px 0 6px 8px;
}
#nav a:hover {
text-decoration: underline;
}
#nav .important {
border: none;
background: 188px 10px url(images/arr_orange.gif) no-repeat;
}
#nav .important a {
color: #E9C379;
}
#news {
background: url(images/news_bg.jpg) repeat-y;
padding-left: 37px;
padding-right: 22px;
padding-bottom: 3px;
text-align: justify;
}
#news h2 {
font-size: 12px;
color: #BE8B06;
}
#news h3, #news p {
font-size: 11px;
margin: 1em 8px 1em 0;
}
#news a {
color: #74653D;
font-weight: bold;
text-decoration: underline;
}
#news a:hover {
color: #38301A;
}
#news .more {
font-size: 9px;
}
#news .hr-dots {
background: center url(images/dots.gif) repeat-x;
height: 10px;
}
#support {
background: url(images/support.jpg) no-repeat;
padding: 1px;
height: 97px;
color: #1A1A18;
}
#support p {
margin: 0.7em 2.6em;
}
#right {
float: right;
width: 490px;
padding-right: 9px;
padding-top: 301px;
}
#right h2 {
font: 18px arial, sans-serif;
color: #BE8B06;
border-bottom: 1px solid #C4AE7C;
padding-bottom: 6px;
margin-bottom: 1em;
}
#right h3 {
font: 14px arial, sans-serif;
color: #BE8B06;
border-bottom: 1px solid #C4AE7C;
padding-bottom: 6px;
margin-bottom: 1em;
margin-top: 2em;
}
#welcome {
margin-right: 20px;
}
#profile {
margin-right: 16px;
}
#right .left {
margin-right: 18px;
}
#right .more {
font-weight: bold;
font-size: 10px;
}
#corp, #indu {
float: left;
width: 49%;
}
#corp {
margin-right: 1%;
}
#corp-img, #indu-img {
background: url(images/pic_2.jpg) no-repeat;
width: 112px;
height: 23px;
float: left;
margin-right: 18px;
text-align: center;
padding-top: 90px;
font-size: 9px;
font-weight: bold;
}
#indu-img {
background: url(images/pic_3.jpg) no-repeat;
}
#spacer {
height: 2em;
}
#footer {
background: url(images/footer_bg.gif) repeat-y;
}
#copyright {
text-align: center;
padding: 22px 0px 30px 00px;
font-size: 9px;
color: #715F36;
font-weight: bold;
}
#footerline{
background: url(images/footerline.gif) no-repeat;
height:10px;
margin-top:0px;
display:block;
font-size:1px;
}
___
email.php ( função enviar para email configurado)
<?php
echo "<html>
<head>
<title> Processando... </title>
<link rel=\"stylesheet\" href=\"class.css\" type=\"text/css\">
</head>";
// Variaveis originadas no email_form.php
$nome = $_POST['nome'];
$email = $_POST['email'];
$cidade = $_POST['cidade'];
$estado = $_POST['estado'];
$assunto = $_POST['assunto'];
$mensagem = $_POST['mensagem'];
// adicionei a captura do ip do remetente
$ip = $_SERVER['REMOTE_ADDR'];
//Seu email, para onde irao as informações do formulário
$mail_destino = "contato@hotelmontevideu.com";
echo "<body bgcolor=\"#FFFFFF\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"0\" marginheight=\"0\">
<center><font class=\"texto\">";
//Mensagem de cabeçalho do email
$mail_header = "Mensagem do formulario do site.";
//Mensagem para o email de resposta
$msg_reply = "Oi $nome,\nRecebemos o seu email com o assunto $assunto.\n\nObrigado pelo seu contato!\n\n Em breve entraremos em contato.\n Obrigado.\n";
//Mensagem de Erro
$msg_erro = "Os campos (Nome, E-mail e Mensagem ) podem estar em branco.Verifique";
//Endereço do seu SMTP (para se conectar no SMTP) (acho que é só para windows afinal não tem postfix ou sendmail)
//$msg_smtp_url = "<p>smtp.prov.com.br</p>";
//Login do seu SMTP (para se conectar no SMTP)
//$msg_smtp_login = "";
//Senha do seu SMTP (para se conectar no SMTP)
//$msg_smtp_senha = "";
//Obrigatoriedade
if ($nome!="" and $assunto!="" and $email!="")
{
$msg.="$mail_header\n\n";
$msg.="Nome: $nome\n";
$msg.="Cidade: $cidade\n";
$msg.="Estado: $estado\n";
$msg.="Email: $email\n";
$msg.="Assunto: $assunto\n";
$msg.="Mensagem: $mensagem\n";
$msg.="ip da origem: $ip";
if (mail($mail_destino, "Formulário de Contato: $assunto", $msg, "From:$nome<$email>"))
{
//Imprimindo confirmação de envio
echo
" </font></center>
<html>
<meta http-equiv=refresh content=5;URL=./></html>";
echo "<font class=\"texto\">";
echo "<b>Oi! $nome</b>,<br><br>Sua mensagem:<br> <font color=\"#FF0000\"><b>$mensagem </b></font><br>Foi enviada com sucesso!<br><br>";
echo "Obrigado!<br>Em breve entraremos em contato.<br><br>IP: <b>$ip</b></font>
";
//Enviando mensagem de confirmação para o email do internauta
mail("$nome<$email>", "Re:Formulário enviado: $assunto", $msg_reply, "From:<$mail_destino>");
}
else
echo
"
<meta http-equiv=refresh content=3;URL=../>
</html><center><br><br><font color=red>
<b>Erro ao enviar e-mail!</b>
</font></center>
";
}
else
{
//Alerta sobre os campos obrigatórios
echo
"
<br><br><center>
$msg_erro <br><br>
<a href=\"java script:window.history.go(-1)\" class=\"links\">Por favor, volte e preencha corretamente.</a>
</center>
";
}
?> _____ Por Favor me ajude nesse caso! Ficarei muito grato por uma ajuda! Abraço ScriptBR! bustamantte