Tema: formulario
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/08/2011, 09:38
toyeslomao
 
Fecha de Ingreso: diciembre-2010
Ubicación: tenerife
Mensajes: 60
Antigüedad: 13 años, 4 meses
Puntos: 0
formulario

hola chicos, a vuelta con el lio de formularios , aqui vengo conun error que me da el que he creado , os remito los codigos a ver que es lo que le pasa, ( por cierto hice uno online , pero es que me gustaria hacerlo a mi )

<!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 style="background-color:#00cc66"><table width="614" cellspacing="0" align="center" bgcolor="#009966">
<tr>
<th width="263" scope="col"><form method="POST"action="recibido1.php" >
<p>Nombre:&nbsp;&nbsp;
<input type="text" name="nombre" />
</p>
<p>
E-mail:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<input type="text" name="mail" />
</p>
<p>
Poblacion :
<input type="text" name="poblacion" />
</p>
<p>Telefono:&nbsp;&nbsp;
<input type="text" name="telefono" />
</p>
<p>
<input type="submit">
</p>
</form>
</th>
<th width="345" scope="col"><form id="form1" name="form1" method="post" action="">
<label for="mensaje">mensaje<br /></label>
<textarea name="mensaje" id="mensaje" cols="30" rows="10"></textarea>
</form></th>
</tr>
</table>


</body>
</html>

CODIGO PHP

<?php
echo " Nombre:". $_POST['nombre'];
echo "<br>";
echo "E-mail:". $_POST['mail'];
echo "Poblacion:".$_POST['poblacion'];
echo "Telefono:".$_POST['telefono'];

$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 . ", el conseguidor " . $empresa . " \r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";
$mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());

$para = '[email protected]';
$asunto = 'Contacto desde el conseguidor';

mail($para, $asunto, utf8_decode($mensaje), $header);

echo '&mensaje enviado&';


?>

pero al comprobarlo en localhost me da este error , algo del smtp o algo asi ,

Nombre:
E-mail:Poblacion:Telefono:
Warning: mail() [function.mail]: Failed to connect to mailserver at "127.0.0.1" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\proyecto\recibido1.php on line 23
&mensaje enviado

gracias por vuestra ayuda