Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/02/2007, 13:34
Avatar de deet
deet
 
Fecha de Ingreso: mayo-2005
Ubicación: Córdoba - Argentina
Mensajes: 269
Antigüedad: 21 años, 5 meses
Puntos: 1
Re: probelmas al mandar al formulario contacto .php actulizo y me sige mandando el e

luego de procesar el mail podrías enviarlo a una pagina que te muestre los errores

contacto.php
Código PHP:
<?
$CorreoDestino 
=  "@,@ ";
$CorreoCopia =  
$CorreoCopiaO =  "@, @";

$Nombre = $_POST["NOMBRE"];
$RUT = $_POST["RUT"];
$dv = $_POST["dv"];
$CORREO = $_POST["CORREO"];
$textarea = $_POST["textarea"];
$APELLIDO = $_POST["APELLIDO"];
$TELEFONO = $_POST["TELEFONO"];


$msg = "";
$msg .= "La siguiente persona llenó el formulario de Contacto:\n\n";
$msg .= "Rut: " . $RUT . "";$msg .= "- " . $dv . "\n";
$msg .= "Nombre : " . $NOMBRE . "\n";
$msg .= "Apellidos: " . $APELLIDO . "\n";
$msg .= "Telefono: " . $TELEFONO . "\n";
$msg .= "Correo: " . $CORREO . "\n";
$msg .= "Nota: " . $nota . "\n";


//$headers = "";
//$headers .= "From: " . $NOMBRE . "<" . $CORREO . ">\n";
//$headers .= "Cc: " . $CorreoCopia. "\n";
//$headers .= "Bcc: " . $CorreoCopiaO. "\n"; 
//$headers .= "Content-Type: text\n";
//$headers .= "X-Sender: <" . $CORREO. ">\n";
//$headers .= "X-Mailer: PHP\n";
//$headers .= "X-Priority: 1\n";
//$headers .= "Return-Path: <" . $CORREO. ">\n";


if(!mail ( trim( $CorreoDestino ) , "Contacto (Web Living)", $msg, $headers))
{
   
header("location:error.php?e=1");
   exit();
}
else
{
   
header("location:error.php?e=0");
   exit();
}
?>
error.php
Código PHP:
<?
switch($_GET['e']){
case 
0:
echo 
'<p align="center"><span class="tex1">No se pudo enviar el Mensaje</h1>';
break;
case 
1:
echo 
'<p align="center"><span class="tex1">Su 
                              Mensaje ha sido recibido</span></p>'
;
break;
}
?>