Ver Mensaje Individual
  #15 (permalink)  
Antiguo 05/10/2008, 13:50
cccdigital
 
Fecha de Ingreso: octubre-2008
Mensajes: 20
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Crear send.php a partir de un formulario ya echo en html

Cita:
Iniciado por jaronu Ver Mensaje
pon como dejaste el codigo, me suena a qie no has cerrado un corchete }
QUIERES DECIR QUE AQUI:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CCCDigital S.A</title>
<?php $nom = seguridad ($_POST['nom']);
$cognom = seguridad ($_POST['cognom']);
$empresa = seguridad ($_POST['empresa']);
$direccio = seguridad ($_POST['direccio']);
$poblacio = seguridad ($_POST['poblacio']);
$provincia = seguridad ($_POST['provincia']);
$comentari = seguridad ($_POST['comentari']);
$telefon = seguridad ($_POST['telefon']);
$email = seguridad ($_POST['email']);



if ($nom ==NULL || $cognom ==NULL || $empresa == NULL || $direccio == NULL || $poblacio ==NULL || $provincia == NULL || $email == NULL){


echo '<div align=center><table width="600" border="0" cellspacing="0" cellpadding="0">';
echo '<tr aling= "center" class="Estilo1">';
echo "<div align=center>";
echo "Sius plau rellene tot el formulari de contecte, graçies";
echo "</div>";
echo "<br>";
echo "<br>";
echo "<div align=center>";
echo "<a href= \"javascript:history.go(-1)\" class=\"Estilo1\">Torna</a>";
echo "</div>";
echo "</tr>";

echo "</table>";
echo "</div>";


}else {

if (isset ($_POST['nom']) ){



$nombre_origen = "xxxxxxxxxx";
$email_origen = "[email protected]";
$email_copia = "[email protected]";
$email_ocultos = "[email protected]";
$email_destino = "[email protected]"; //cambiar esta linea por la de encima cuando termine la aplicacion


$asunto = " Rebut email de contacte de ".$empresa."";

$mensaje = '<table width="629" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="623" align="left"></td>
</tr>
<tr>
<td bgcolor="#E0911B"><div style="color:#FFFFFF; font-size:14; font-family: Arial, Helvetica, sans-serif; text-transform: capitalize; font-weight: bold;"><strong> Email de contacte de '.$empresa.'</strong></div></td>
</tr>
<tr>
<td height="95" align="left" valign="top"><div style=" color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:12px; margin-bottom:3px;"> </strong><br><br>

<strong>NOM : </strong>'.$nom.'</strong><br><br>
<strong>COGNOM : </strong>'.$cognom.'</strong><br><br>
<strong>DIRECCIO : </strong>'.$direccio.'</strong><br><br>
<strong>POBLACIO : </strong>'.$poblacio.'</strong><br><br>
<strong>PROVINCIA : </strong>'.$provincia.'</strong><br><br>
<strong>TELEFON : </strong>'.$telefon.'</strong><br><br>
<strong>E-MAIL : </strong>'.$email.'</strong><br><br>
<strong>COMENTARI : </strong>'.$comentari.'</strong><br><br><br>


</div>
</td>
</tr>
</table>';




$formato = "html";

//************************************************** ***************//
$headers = "From: $nombre_origen <$email_origen> \r\n";
$headers .= "Return-Path: <$email_origen> \r\n";
$headers .= "Reply-To: $email_origen \r\n";


$headers .= "X-Sender: $email_origen \r\n";

$headers .= "X-Priority: 3 \r\n";
$headers .= "MIME-Version: 1.0 \r\n";
$headers .= "Content-Transfer-Encoding: 7bit \r\n";

//************************************************** ***************//

if($formato == "html")
{ $headers .= "Content-Type: text/html; charset=iso-8859-1 \r\n"; }
else
{ $headers .= "Content-Type: text/plain; charset=iso-8859-1 \r\n"; }

if (@mail($email_destino, $asunto, $mensaje, $headers))
{
?>
</head>
}

QUIERES DECIR QUE ASI?