Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/01/2011, 08:29
chuntin
 
Fecha de Ingreso: abril-2006
Mensajes: 147
Antigüedad: 20 años, 6 meses
Puntos: 1
Respuesta: duda con enviar.php

Código PHP:
<?php

$nombre 
= $_POST['nombre'];
$mail = $_POST['mail'];
$telefono = $_POST['tlf'];
$texto = $_POST['texto'];
$select = $_POST['departamento'];

$header = 'From: ' . $mail . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";

$mensaje = "Este mensaje fue enviado por " . $nombre .   ".  \r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";
$mensaje .= "Su telefono es: " . $telefono . " \r\n";
$mensaje .= "texto: " . $texto . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());

if (
$select=="direccion"){
    
$para = "[email protected]";
    }elseif (
$select=="contabilidad"){
    
$para = "[email protected]";
    }elseif (
$select=="presu_zgz"){
    
$para = "[email protected]";
    }elseif (
$select=="presu_ler"){
    
$para = "[email protected]";
    }elseif (
$select=="info"){
    
$para = "[email protected]";
    }

$asunto = 'Contacto desde www.eurocierre.com (Formulario de contacto)';

 
mail($para, $asunto, utf8_decode($mensaje), $header);
 
header("Location: gracias.html");

?>
pero pongo esto y al darle a enviar pone: 500 internal server error

donde tengo el fallo pues?