AndersonxD Postado Janeiro 11, 2017 Denunciar Share Postado Janeiro 11, 2017 AI galera estou com duvida como enviar esse codigo todo como mensagem por email: <?php $peca1 = $_POST['peca1']; $peca2 = $_POST['peca2']; $peca3 = $_POST['peca3']; $peca4 = $_POST['peca4']; $peca5 = $_POST['peca5']; $peca6 = $_POST['peca6']; $peca7 = $_POST['peca7']; $peca8 = $_POST['peca8']; $peca9 = $_POST['peca9']; $peca10 = $_POST['peca10']; $peca11 = $_POST['peca11']; $peca12 = $_POST['peca12']; $peca13 = $_POST['peca13']; $peca14 = $_POST['peca14']; $peca15 = $_POST['peca15']; $peca16 = $_POST['peca16']; $peca17 = $_POST['peca17']; $peca18 = $_POST['peca18']; $peca19 = $_POST['peca19']; $peca20 = $_POST['peca20']; $peca21 = $_POST['peca21']; $peca22 = $_POST['peca22']; ?> <!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"> <div Class="inicio"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>J.A.Salgados</title> <link rel="stylesheet" type="text/css" href="Terceiro.css"> </head> <body> </div> <div class="coluna1"> <table width="88%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="83%">Coxinha frita</td> <td width="17%"> <input name="textfield" type="text" size="10" value="<?php echo $peca1?>"></td> </tr> <tr> <td>Coxinha de forno</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca2?>"></td> </tr> <tr> <td>Pastel de forno frango</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca3?>"></td> </tr> <tr> <td>Pastel de forno misto</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca4?>"></td> </tr> <tr> <td>Pastel de forno carne</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca5?>"></td> </tr> <tr> <td>Pastel de forno bacalhau</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca6?>"></td> </tr> <tr> <td>Empada de bacalhau<br></td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca7?>"></td> </tr> <tr> <td>Empada de frango</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca8?>"></td> </tr> <tr> <td>Enroladinho de forno</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca9?>"></td> </tr> <tr> <td>Esfirra de carne</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca10?>"></td> </tr> <tr> <td>Esfirra de frango</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca11?>"></td> </tr> <tr> <td>Kibe </td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca12?>"></td> </tr> </table> </div> <div class="coluna2"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>Pão de queijo</td> <td><input name="textfield" type="text" size="10" value="<?php echo $peca13?>"></td> </tr> <tr> <td>Pão pizza</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca14?>"></td> </tr> <tr> <td>Pizza brotinho</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca15?>"></td> </tr> <tr> <td>Pizza grande</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca16?>"></td> </tr> <tr> <td>Risole</td> <td><input name="textfiels" type="text" size="10" maxlength="2" value="<?php echo $peca17?>"></td> </tr> <tr> <td>Saltenha de carne</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca18?>"></td> </tr> <tr> <td>Saltenha de Frango</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca19?>"></td> </tr> <tr> <td>Pastel frito de carne</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca20?>"></td> </tr> <tr> <td>Pastel frito de frango</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca21?>"></td> </tr> <tr> <td>Pastel frito misto</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca22?>"></td> </tr> <tr> <td>Pastel frito de calabresa</td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca23?>"></td> </tr> <tr> <td>Banana real </td> <td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca24?>"></td> </tr> </table> </div> <input type="submit" value="Enviar" /> </form> </body > </html> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// O Index dele: <!doctype html> <html> <div Class="inicio"> <head> <title>J.A.Salgados</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="Terceiro.css"> </head> <body> <h1>Bem vindo ao J.A. Salgados</h1> <div class="menu"> <h3>MENU</h3> <ul> <li><a href="Primeiro.html">Inicio</a></li> <li><a href="#">Conheça-nos</a></li> <li><a href="Terceiro.html">Pedido</a></li> <li><a href="Quarto.html">Fale conosco</a></li> </ul> <h2>Faça seu pedido</h2> </div> <div class="coluna1"> <form method="POST" action="Recebendo.php" > <table width="88%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="83%">Coxinha frita</td> <td width="17%"><input name="peca1" type="number" size="10"></td> </tr> <tr> <td>Coxinha de forno</td> <td><input name="peca2" type="number" size="10"></td> </tr> <tr> <td>Pastel de forno frango</td> <td><input name="peca3" type="number" size="10"></td> </tr> <tr> <td>Pastel de forno misto</td> <td><input name="peca4" type="number" size="10"></td> </tr> <tr> <td>Pastel de forno carne</td> <td><input name="peca5" type="number" size="10"></td> </tr> <tr> <td>Pastel de forno bacalhau</td> <td><input name="peca6" type="number" size="10"></td> </tr> <tr> <td>Empada de bacalhau<br></td> <td><input name="peca7" type="number" size="10"></td> </tr> <tr> <td>Empada de frango</td> <td><input name="peca8" type="number" size="10"></td> </tr> <tr> <td>Enroladinho de forno</td> <td><input name="peca9" type="number" size="10"></td> </tr> <tr> <td>Esfirra de carne</td> <td><input name="peca10" type="number" size="10"></td> </tr> <tr> <td>Esfirra de frango</td> <td><input name="peca11" type="number" size="10"></td> </tr> <tr> <td>Kibe </td> <td><input name="peca12" type="number" size="10"></td> </tr> </table> </div> <div class="coluna2"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>Pão de queijo</td> <td><input name="peca13" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pão pizza</td> <td><input name="peca14" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pizza brotinho</td> <td><input name="peca15" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pizza grande</td> <td><input name="peca16" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Risole</td> <td><input name="peca17" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Saltenha de carne</td> <td><input name="peca18" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Saltenha de Frango</td> <td><input name="peca19" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pastel frito de carne</td> <td><input name="peca20" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pastel frito de frango</td> <td><input name="peca21" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pastel frito misto</td> <td><input name="peca22" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Pastel frito de calabresa</td> <td><input name="peca23" type="number" size="10" maxlength="2"></td> </tr> <tr> <td>Banana real </td> <td><input name="peca24" type="number" size="10" maxlength="2"></td> </tr> </table> </div> </form> </body > </div> </html> Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 greaseflog Postado Janeiro 23, 2017 Denunciar Share Postado Janeiro 23, 2017 AndersonXD conseguiu enviar ? Estou com dificuldade em compreender qual e-mail eu devo colocar aqui $email_servidor ? Este e mail é um contrato para Disparo de e-mail marketing ou poderia ser um e-mail próprio? <?php function pegaValor($valor) { return isset($_POST[$valor]) ? $_POST[$valor] : ''; } function validaEmail($email) { return filter_var($email, FILTER_VALIDATE_EMAIL); } function enviaEmail($de, $assunto, $mensagem, $para, $email_servidor) { $headers = "From: $email_servidor\r\n" . "Reply-To: $de\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($para, $assunto, nl2br($mensagem), $headers); } $email_servidor = "pop.terra.com.br"; $para = "atendimento@meuservidor.com.br"; $de = pegaValor("email"); $mensagem = pegaValor("mensagem"); $assunto = "Assunto da mensagem"; if ($nome && validaEmail($de) && $mensagem) { enviaEmail($de, $assunto, $mensagem, $para, $email_servidor); $pagina = "mail_ok.php"; } else { $pagina = "mail_error.php"; } header("location:$pagina"); ?> Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
AndersonxD
AI galera estou com duvida como enviar esse codigo todo como mensagem por email:
<?php
$peca1 = $_POST['peca1'];
$peca2 = $_POST['peca2'];
$peca3 = $_POST['peca3'];
$peca4 = $_POST['peca4'];
$peca5 = $_POST['peca5'];
$peca6 = $_POST['peca6'];
$peca7 = $_POST['peca7'];
$peca8 = $_POST['peca8'];
$peca9 = $_POST['peca9'];
$peca10 = $_POST['peca10'];
$peca11 = $_POST['peca11'];
$peca12 = $_POST['peca12'];
$peca13 = $_POST['peca13'];
$peca14 = $_POST['peca14'];
$peca15 = $_POST['peca15'];
$peca16 = $_POST['peca16'];
$peca17 = $_POST['peca17'];
$peca18 = $_POST['peca18'];
$peca19 = $_POST['peca19'];
$peca20 = $_POST['peca20'];
$peca21 = $_POST['peca21'];
$peca22 = $_POST['peca22'];
?>
<!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">
<div Class="inicio">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>J.A.Salgados</title>
<link rel="stylesheet" type="text/css" href="Terceiro.css">
</head>
<body>
</div>
<div class="coluna1">
<table width="88%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="83%">Coxinha frita</td>
<td width="17%">
<input name="textfield" type="text" size="10" value="<?php echo $peca1?>"></td>
</tr>
<tr>
<td>Coxinha de forno</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca2?>"></td>
</tr>
<tr>
<td>Pastel de forno frango</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca3?>"></td>
</tr>
<tr>
<td>Pastel de forno misto</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca4?>"></td>
</tr>
<tr>
<td>Pastel de forno carne</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca5?>"></td>
</tr>
<tr>
<td>Pastel de forno bacalhau</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca6?>"></td>
</tr>
<tr>
<td>Empada de bacalhau<br></td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca7?>"></td>
</tr>
<tr>
<td>Empada de frango</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca8?>"></td>
</tr>
<tr>
<td>Enroladinho de forno</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca9?>"></td>
</tr>
<tr>
<td>Esfirra de carne</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca10?>"></td>
</tr>
<tr>
<td>Esfirra de frango</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca11?>"></td>
</tr>
<tr>
<td>Kibe </td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca12?>"></td>
</tr>
</table>
</div>
<div class="coluna2">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Pão de queijo</td>
<td><input name="textfield" type="text" size="10" value="<?php echo $peca13?>"></td>
</tr>
<tr>
<td>Pão pizza</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca14?>"></td>
</tr>
<tr>
<td>Pizza brotinho</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca15?>"></td>
</tr>
<tr>
<td>Pizza grande</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca16?>"></td>
</tr>
<tr>
<td>Risole</td>
<td><input name="textfiels" type="text" size="10" maxlength="2" value="<?php echo $peca17?>"></td>
</tr>
<tr>
<td>Saltenha de carne</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca18?>"></td>
</tr>
<tr>
<td>Saltenha de Frango</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca19?>"></td>
</tr>
<tr>
<td>Pastel frito de carne</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca20?>"></td>
</tr>
<tr>
<td>Pastel frito de frango</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca21?>"></td>
</tr>
<tr>
<td>Pastel frito misto</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca22?>"></td>
</tr>
<tr>
<td>Pastel frito de calabresa</td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca23?>"></td>
</tr>
<tr>
<td>Banana real </td>
<td><input name="textfield" type="text" size="10" maxlength="2" value="<?php echo $peca24?>"></td>
</tr>
</table>
</div>
<input type="submit" value="Enviar" />
</form>
</body >
</html>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
O Index dele:
<!doctype html>
<html>
<div Class="inicio">
<head>
<title>J.A.Salgados</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="Terceiro.css">
</head>
<body>
<h1>Bem vindo ao J.A. Salgados</h1>
<div class="menu">
<h3>MENU</h3>
<ul>
<li><a href="Primeiro.html">Inicio</a></li>
<li><a href="#">Conheça-nos</a></li>
<li><a href="Terceiro.html">Pedido</a></li>
<li><a href="Quarto.html">Fale conosco</a></li>
</ul>
<h2>Faça seu pedido</h2>
</div>
<div class="coluna1">
<form method="POST" action="Recebendo.php" >
<table width="88%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="83%">Coxinha frita</td>
<td width="17%"><input name="peca1" type="number" size="10"></td>
</tr>
<tr>
<td>Coxinha de forno</td>
<td><input name="peca2" type="number" size="10"></td>
</tr>
<tr>
<td>Pastel de forno frango</td>
<td><input name="peca3" type="number" size="10"></td>
</tr>
<tr>
<td>Pastel de forno misto</td>
<td><input name="peca4" type="number" size="10"></td>
</tr>
<tr>
<td>Pastel de forno carne</td>
<td><input name="peca5" type="number" size="10"></td>
</tr>
<tr>
<td>Pastel de forno bacalhau</td>
<td><input name="peca6" type="number" size="10"></td>
</tr>
<tr>
<td>Empada de bacalhau<br></td>
<td><input name="peca7" type="number" size="10"></td>
</tr>
<tr>
<td>Empada de frango</td>
<td><input name="peca8" type="number" size="10"></td>
</tr>
<tr>
<td>Enroladinho de forno</td>
<td><input name="peca9" type="number" size="10"></td>
</tr>
<tr>
<td>Esfirra de carne</td>
<td><input name="peca10" type="number" size="10"></td>
</tr>
<tr>
<td>Esfirra de frango</td>
<td><input name="peca11" type="number" size="10"></td>
</tr>
<tr>
<td>Kibe </td>
<td><input name="peca12" type="number" size="10"></td>
</tr>
</table>
</div>
<div class="coluna2">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Pão de queijo</td>
<td><input name="peca13" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pão pizza</td>
<td><input name="peca14" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pizza brotinho</td>
<td><input name="peca15" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pizza grande</td>
<td><input name="peca16" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Risole</td>
<td><input name="peca17" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Saltenha de carne</td>
<td><input name="peca18" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Saltenha de Frango</td>
<td><input name="peca19" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pastel frito de carne</td>
<td><input name="peca20" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pastel frito de frango</td>
<td><input name="peca21" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pastel frito misto</td>
<td><input name="peca22" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Pastel frito de calabresa</td>
<td><input name="peca23" type="number" size="10" maxlength="2"></td>
</tr>
<tr>
<td>Banana real </td>
<td><input name="peca24" type="number" size="10" maxlength="2"></td>
</tr>
</table>
</div>
</form>
</body >
</div>
</html>
Link para o comentário
Compartilhar em outros sites
1 resposta 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.