Html - Ajuda

dkueti

Power Member
Estou numa página de html, fiz um questionário, mas depois no ícones "enviar", carregando ai, como é que faço para o questionário ir para o meu mail?
 
tens que criar um script... por exemplo em php...

http://pt.php.net/mail


edit: e depois chamas a função/script php na propriedade "action" do form

<form name="form1" method="post" action="envia_mail.php">
<input type=text value="insira o seu mail..." name="dest_mail" />
...
</form>
 
Última edição:
Posso, mas o teu servidor aceita PHP ?

Onde tens esse ficheiro html, cria outro ficheiro chamado (submit.php)

E copia e cola este texto integralmente:

PHP:
<?php
//Dados do Destino
$email_destino = "";
$email_assunto = "";

//Dados do Email
$nome = $_POST['r1_name'];
$data_n = $_POST['dob'];
$sexo = ucfirst($_POST['gender']);
$email = $_POST['email'];
$pais = $_POST['country'];
$nick = $_POST['board'];
$explicacao = $_POST['reason'];

//Formatacao do Email
$email_texto = "<html><body>";
$email_texto.= "Acabaste de receber mais uma inscri&ccedil;&atilde;o para o teu f&oacute;rum!<br>";
$email_texto.= "Informa&ccedil;&atilde;o do Concorrente";
$email_texto.= "Nome: ".$nome."<br>";
$email_texto.= "Data Nascimento: ".$data_n."<br>";
$email_texto.= "Sexo: ".$sexo."<br>";
$email_texto.= "Endere&ccedil;o de Email: ".$email."<br>";
$email_texto.= "Pais: ".$pais."<br>";
$email_texto.= "Nick do F&oacute;rum: ".$nick."<br>";
$email_texto.= "Explica&ccedil;&atilde;o: ".$explicacao."<br>";
$email_texto.= "</body></html>”;

//Cabecalhos do Email
$cabecalho = “MIME-Version: 1.0\r\n”;
$cabecalho .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$cabecalho .= “From:<".$email.">\r\n”;


if (mail($email_destino, $email_assunto, $email_texto, $cabecalho))
    echo “Email enviado com sucesso.”;
else
    echo “Ocorreu um erro ao Enviar o Email.”;
?>
 
Última edição pelo moderador:
O forumeiros, dá-nos umas paginas para editarmos com html... mas acho que nao da php...

O codigo e este:

Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html dir="ltr" lang="pt"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Portugal Online - Candidaturas para Moderador</title><link rel="stylesheet" href="/18-ltr.css" type="text/css" /><script type="text/javascript" src="/js_39/pt.js"></script><style type="text/css"></style></head><body background="[URL]http://illiweb.com/fa/vide.gif[/URL]" bgcolor="#161a1b" text="#97aae6" link="#2556a5" vlink="#5a86ce"><a name="top"></a><center><table class="bodylinewidth" width="80%" cellspacing="0" cellpadding="10" border="0"><tr><td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td align="center" width="100%" valign="middle"><a href="/index.htm"><img src="[URL]http://i16.servimg.com/u/f16/11/27/60/86/pokemo10.gif[/URL]" id="i_logo" border="0" alt="Portugal Online" vspace="1" /></a><br /><span class="maintitle">Portugal Online</span><br /><span class="gen">Este é o fórum onde tu podes encontrar informações sobre quase tudo.</span></td></tr></table><table cellspacing="0" cellpadding="0" border="0" align="center"><tr><td align="center"><a class="mainmenu" href="/index.htm"><img id="i_icon_mini_index" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_start.gif[/URL]" border="0" hspace="0" alt="Início" title="Início"></a><a class="mainmenu" href="/portal.htm"><img id="i_icon_mini_portal" src="[URL]http://illiweb.com/fa/bbtech/icon_mini_portal_en.gif[/URL]" border="0" hspace="0" alt="Portal" title="Portal"></a><a class="mainmenu" href="/calendar.forum"><img id="i_icon_mini_calendar" src="[URL]http://illiweb.com/fa/bbtech/icon_mini_calendar_en.gif[/URL]" border="0" hspace="0" alt="Calendário" title="Calendário"></a><a class="mainmenu" href="/faq.htm"><img id="i_icon_mini_faq" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_faq.gif[/URL]" border="0" hspace="0" alt="FAQ" title="FAQ"></a><a class="mainmenu" href="/search.forum" OnClick="showhide(document.getElementById('search_menu')); return false;"><img id="i_icon_mini_search" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_search.gif[/URL]" border="0" hspace="0" alt="Buscar" title="Buscar"></a><script>insert_search_menu();</script><a class="mainmenu" href="/memberlist.forum"><img id="i_icon_mini_members" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_members.gif[/URL]" border="0" hspace="0" alt="Membros" title="Membros"></a><a class="mainmenu" href="/groupcp.forum"><img id="i_icon_mini_groups" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_team.gif[/URL]" border="0" hspace="0" alt="Grupos" title="Grupos"></a><a class="mainmenu" href="/profile.forum?mode=editprofile"><img id="i_icon_mini_profile" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_usercp.gif[/URL]" border="0" hspace="0" alt="Perfil" title="Perfil"></a><a class="mainmenu" href="/msg.forum?folder=inbox"><img id="i_icon_mini_message" src="[URL]http://board.ogame.com.pt/pt_images_ogame/top_pms.gif[/URL]" border="0" hspace="0" alt="Mensagens privadas" title="Mensagens privadas"></a><a class="mainmenu" href="/login.forum?logout=true&sid=82f38727446d5a6d2db8bdabf5b18618"><img id="i_icon_mini_logout" src="[URL]http://board.ogame.com.pt/pt_images_ogame/user_offline.gif[/URL]" border="0" hspace="0" alt="Sair [ Admin ]" title="Sair [ Admin ]"></a></td></tr></table><div style="clear: both;"></div></center><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL]http://www.w3.org/TR/html4/loose.dtd[/URL]">
<html>
<head>
<title>Candidaturas Portugal-Online</title>
<style type="text/css">
<!--
body {
margin:0px 10px; background-color: #061229;
background-image: url('images/mainback.gif');
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<table width="736" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11">&nbsp;</td>
<td width="712">&nbsp;</td>
<td width="13">&nbsp;</td>
</tr>
<tr>
<td width="11">&nbsp;</td>
<td width="712">
 
<table width='100%' border='0' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
<tr>
<td width='98%' height='20'><p align='right'><a href='?page=login'>Login</a></td>
</tr>
</table>
<br>
<br>
<table width='98%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='20'></td>
<td align='left'><span class='sizeh1'><B>Bem-Vindo à aplicação de candidatura para Moderador</B></span></td>
</tr>
</table>
<table width='98%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='2' height='2'><img src='images/top_left.gif' width='2' height='2'></td>
<td background='images/top.gif' height='2'></td>
<td width='2' height='2'><img src='images/top_right.gif' width='2' height='2'></td>
</tr>
<tr>
<td background='images/left_border.gif'></td>
<td align='left' background='images/black_trans.gif' class='normtext' style='padding-top:5px; padding-right:5px; padding-bottom:5px; padding-left:5px;' bordercolor='#FFFFFF' valign='top'>
<div>
<form method='post' action='submit.php'>
<table border='0' width='95%' align='center'>
<input type='hidden' name='application' value='Moderator'>
<tr>
<td>Nome Real:</td><td> 
<input name='rl_name' class='application' size='30' /></td>
</tr>
<tr>
<td>Data de Nascimento:</td><td> 
<input name='dob' class='application' size='30' /></td>
</tr>
<tr>
<td>Sexo:</td><td><select size='1' class='eingabe' name='gender' tabindex='15'>
<option value='male' selected>masculino</option>
<option value='female'>feminino</option>
</select></td>
</tr>
<tr>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr>
<td>Endereço Email:</td><td> 
<input name='email' class='application' size='30' /></td>
</tr>
<tr>
 
<td>País:</td><td> 
<SELECT tabindex='16' class='eingabe' name='country' id='Country' class='DropDown' maxlength='64' title='Country/Region' size='1'>
<option value='Portugal' selected>Portugal
<option value='Ásia'>Ásia
<option value='Australia'>Australia
<option value='Brasil'>Brasil
<option value='Canadá'>Canadá
<option value='China'>China
<option value='Dinamarca'>Dinamarca
<option value='França'>França
<option value='Alemanha'>Alemanha
<option value='Grécia'>Grécia
<option value='Hong Kong'>Hong Kong
<option value='India'>India
<option value='Indonesia'>Indonesia
<option value='Irlandia'>Irlandia
<option value='Itália'>Itália
<option value='Koreia'>Koreia
<option value='Malásia'>Malásia
<option value='México'>México
<option value='Nova Zelândia'>Nova Zelândia
<option value='Noruega'>Noruega
<option value='Filipinas'>Filipinas
<option value='Polónia'>Polónia
<option value='Singapura'>Singapura
<option value='Espanha'>Espanha
<option value='Suécia'>Suécia
<option value='Taiwan'>Taiwan
<option value='Tailandia'>Tailandia
<option value='Turquia'>Turquia
<option value='Reino Unido'>Reino Unido
<option value='Estados Unidos'>Estados Unidos
<option value='Vietnam'>Vietnam
<option value='Outro'>Outro
</SELECT></td>
</tr>
<tr>
 
<td>&nbsp;</td><td> 
&nbsp;</td>
</tr>
<tr>
 
 
 
<td>Nick no Fórum:</td><td> 
<input name='board' class='application' size='30' /></td>
</tr>
<tr>
 
 
 
 
 
 
 
<td>&nbsp;</td><td> 
&nbsp;</td>
</tr>
<tr>
<td colspan='2'>Porque razão deviamos dar-te uma posição no Fórum:</td>
</tr>
<tr>
<td colspan='2' width='543'> 
<textarea name='reason' class='application-text' cols='65' rows='10'></textarea><p>
<button name='submit' value='submit' class='eingabe-button' type='submit'>Enviar</button></td>
</tr>
</table>
</div>
</div>
</div>
 
 
</div>
</form>
</div>
 
 
<td background='images/right_border.gif'></td>
</tr>
<tr>
<td width='2' height='2'><img src='images/bottom_left.gif' width='2' height='2'></td>
<td background='images/bottom.gif' height='2'></td>
<td width='2' height='2'><img src='images/bottom_right.gif' width='2' height='2'></td>
</tr>
</table>
</tr>
</table>
</td>
<td width="13">&nbsp;</td>
</tr>
<tr>
<td width="11">&nbsp;</td>
<td width="712">&nbsp;</td>
<td width="13">&nbsp;</td>
</tr>
</table>
</body>
</html><div align="center"><span class="gen"><strong><a href="/admin/index.forum?part=admin&amp;sid=82f38727446d5a6d2db8bdabf5b18618">Painel de Controle</a><br/><br/></strong><!--
We request you retain the full copyright notice below including the link to [URL="http://www.phpbb.com.This"]www.phpbb.com.This[/URL] not only gives respect to the large amount of time given freely by the developersbut also helps build interest, traffic and use of phpBB. If you cannot (for goodreason) retain the full copyright we request you at least leave in place thePowered by phpBB line, with phpBB linked to [URL="http://www.phpbb.com"]www.phpbb.com[/URL]. If you refuseto include even this then support on our forums may be affected.The phpBB Group : 2002// --><a href="[URL]http://www.forumeiros.com/um-forum-gratis.htm[/URL]" target="_blank" class="copyright">Um forum gratis</a>&nbsp;|&nbsp;<span class="gensmall">&copy;</span> <a href="[URL]http://www.forumeiros.com/pt/phpbb/[/URL]" target="_blank" class="copyright">phpbb</a>&nbsp;|&nbsp;<a name="bottom" href="[URL]http://ajuda.forumeiros.com/[/URL]" target="_blank" class="copyright">Fórum gratis de ajuda</a>&nbsp;|&nbsp;<a name="bottom" href="/stats.htm" class="copyright">Estatísticas</a>&nbsp;|&nbsp;<a href="[URL]http://www.criarumblog.com/pt/[/URL]" target="_blank" class="copyright">Criar seu blog</a></span></div></td></tr></table><script type="text/javascript"><!--
fa_endpage();//--></script></body></html>

Aonde e que eu colo isso?:(
(Desculpem o tamanho ocupado, mas nao da para por mais pequeno...)

Edit: Já tentei e só aceita html...nao consegues fazer em html...
 
Última edição pelo moderador:
Apaga isso, eu já tinha visto o código, e o script já esta a espera desse código.

No teu servidor, crias um ficheiro novo, chamado submit.php, e lá dentro colas o que te dei... se não aceitar PHP tens que procurar um que aceite, metes la o ficheiro, e depois no teu código onde tens submit.php metes o endereço para o ficheiro no outro servidor.
 
Back
Topo