Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/06/2012, 14:07
Avatar de manyblue
manyblue
 
Fecha de Ingreso: marzo-2008
Mensajes: 329
Antigüedad: 16 años, 1 mes
Puntos: 10
Respuesta: Problema Ubuntu, LAMP, formularios, envios

Formulario en pagina codificacion UTF-8:

Código:
<form action="enviar_contacto.php" method="post" id="formulariocontacto">
            <p><strong>Nombre:</strong><br>
            <label for="nombre"></label>
            <input name="nombre" type="text" id="nombre" onBlur="MM_validateForm('nombre','','R','email','','RisEmail','asunto','','R','texto','','R');return document.MM_returnValue">
            <span class="rojo">(*)</span><br>
            <strong>E-mail:</strong><br>
            <label for="email"></label>
            <input type="text" name="email" id="email">
            <span class="rojo">(*)</span><br>
            <strong>Asunto:</strong><br>
            <label for="asunto"></label>
            <input type="text" name="asunto" id="asunto">
            <span class="rojo">(*)</span><br>
            <strong>Teléfono:</strong><br>
            <label for="telefono"></label>
            <input type="text" name="telefono" id="telefono">
            <br>
            <br>
            <strong>Texto: </strong><br>
            <label for="texto"></label>
            <textarea name="texto" id="texto" cols="40" rows="5"></textarea>
&nbsp;            <span class="rojo">(*)</span><br>
<br>
          </p>
            <p>
  <input name="submit" type="submit" id="submit" onClick="MM_validateForm('nombre','','R','email','','RisEmail','asunto','','R','texto','','R');return document.MM_returnValue" value="Enviar">
              &nbsp;
              <input name="reset" type="reset" id="reset" tabindex="5" value="Restablecer">
          </p>
            </p>
          <p>&nbsp;</p>
          <p class="rojo">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="formulario"><strong>Nota:</strong> </span>(*) Campos obligatorios&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
        </form>
enviar_contacto.php

Código:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<?php
 $dia=date("d.m.Y");
 $hora=date("H:i:s");
 $nombre = $_POST['nombre']; 
 $email = $_POST['email'];
 $telefono = $_POST['telefono']; 
 $asunto = $_POST['asunto'];
 $texto = $_POST['texto'];
 $destinatario=[email protected];
 $subject= "FORMULARIO CONTACTO OUTDOORLIVE.TV";
 $desde = 'Desde: ' . $emai;
 $contingut = "
 El mensaje se a enviado el dia: $dia a las: $hora\n\n 
----------------------------------------------------------------------------\n
 Nombre: $nombre\n
 Email:  $email\n
 Telefono:  $telefono\n
 Asunto:  $asunto \n
 Texto:  $texto\n
 ----------------------------------------------------------------------------\n
 ";
 mail($destinatario, $subject, $contingut, $desde); 
 ?>
 
<a href="contacto.php">Volver a la pagina anterior</a>
</body>
</html>
tengo otro enviar contacto:

Código:
<?php
$from = '[email protected]'; 
$subject = 'FORMULARIO DE CONTACTO';
$nombre = $_POST['nombre']; 
$email = $_POST['email']; 
$telefono = $_POST['telefono']; 
$asunto = $_POST['asunto'];
$texto = $_POST['texto']; 
$message = 'DE : ' . $nombre . '
 
E-MAIL : ' . $email . '
 
TELEFONO : ' . $telefono . '
 
ASUNTO : ' . $asunto . ' 
TEXTO : ' . $texto;
$email = '[email protected]' ; 
$headers = "From: ". $from . "\n";
mail ($email, $subject, $message, $header); 
header('Location: http://www.xxxxxxx.com/contacto.php'); 
?>
Pero nada no consigo enviar los formularios.

Gracias de antemano.

Un saludo