Ver Mensaje Individual
  #12 (permalink)  
Antiguo 05/10/2008, 13:40
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
primero

coloca la etiquta <?php al principio del codigo

segundo

usa tus variables, el send es el mio, adaptado a un encargo que me hicieron
estudia un poco el envio y recepcion de variables en PHP

REVISA LAS FAQ'S DEL FORO, ¿NO PRETENDERAS QUE TRABAJEN POR TI?

Y EN EL ACTION DEL FORM PON action"send.php"
dices que aqui <form id="form_92782" class="appnitro" method="post" action="send.php">
<div class="form_description"> lo dejo asi mismo verdad.. ? y no no espero que me lo hagan por mi esque toy probando muchos y no me salen por ejemplo este :

http://www.cccdigital.com/form4.html y no me funciona me da error en la tabla 26 wenu lo eh areglado y nada...

AORA ESTA ME DA ERROR MMIRA, WWW.CCCDIGITAL.COM/FORM1/HTML DA ERROR EN LA LINEA 104 HAY NO HAY NADA :s NO SE SI ME FALTA UN ULTIMO COMANDO O ALGO MIRA :


<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>
ESTA ESLA LINEA 104----

Última edición por cccdigital; 05/10/2008 a las 13:46