Ver Mensaje Individual
  #19 (permalink)  
Antiguo 22/12/2005, 21:58
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 2 meses
Puntos: 1360
hola a todos he intentado hacer ese formulario y la verdad estube muy cerca y me interesa mucho pero al momento de probarlo me lanza este mensaje.
Cita:
Iniciado por Alguna pagina web
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in \\172.21.6.16\s004\*******\Inscribete\enviado.php on line 20
Este el codigo que utilizo:
Código PHP:
<?php 
$nombre
=$_POST['nombre']; 
$apellidos=$_POST['apellidos']; 
$mail=$_POST['mail']; 
$hombre=$_POST['hombre'];
$mujer=$_POST['mujer'];
$admin='inscripcion@*****.com';//este es el mail que aparecera cuando te llegue el correo, si quieres puedes cambiarlo
$mailheaders="From: $admin";
$to='*****@hotmail.com';//Aqui tienes que cambiar la dirección de correo por el tuyo " a donde quieres que te llegue la info
$contacto='Inscripcion'//Este es el titulo del mail

//La función del archivo adjunto no funciona¡
$msg=' Un usuario dejo la siguiente información:
Datos generales
Nombre: $nombre
Apellidos: $apellidos
Correo: $mail
Sexo: $hombre'
;

mail ($to,$contacto,$msg$mailheaders);

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
 Su mensaje fue resivido exitosamente, pronto nos comunicaremos con usted. 
</body>
</html>
Me esta fallando algo? tambien les dejo el del html
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Inscribete</title>
<style type="text/css">
<!--
.style8 {font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #291670;
}
.style9 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #291670; }
body {
	background-image: url(../Imagenes/Fondo.jpg);
}
-->
</style>
</head>

<body bgproperties="fixed">
<p align="center"><img src="../Imagenes/****.jpg" width="385" height="126"> </p>
<div align="center">
  <p><a href="../Index2.xml"><img src="../Imagenes/Incio.gif" width="72" height="32" border="0"></a><a href="../Cursos/Cursos.htm"><img src="../Imagenes/Cursos.gif" width="80" height="32" border="0"></a><a href="../Noticias/Noticias.htm"><img src="../Imagenes/Noticias.gif" width="85" height="32" border="0"></a><a href="../Inscribete/Inscribete.htm"><img src="../Imagenes/Inscribete2.gif" width="94" height="32" border="0"></a><a href="../Articulos/Articulos.htm"><img src="../Imagenes/Articulos.gif" width="90" height="32" border="0"></a><a href="../Conocenos/Conocenos.htm"><img src="../Imagenes/Conocenos.gif" width="101" height="32" border="0"></a>
</p>
<script>
function Verificar() {
	if(document.frm.Educacion.value == "") {
		alert("Por favor indica una opcion");
		document.frm.Educacion.focus();
		return false;
	}

	return true;
}
</script>
  <form action="enviado.php" method="post" enctype="text/plain" name="formulario" id="formulario">
    
    <div align="left">
      <p>Nombre:
        <input name="Nombre" type="text" id="Nombre" value="" size="50">
</p>
      <p>Apellidos:
          <input name="Apellidos" type="text" id="Apellidos" value="" size="49">
      </p>
      <p>Sexo: H
        <input name="Hombre" type="radio" value="Hombre"> 
M
<input name="Mujer" type="radio" value="Mujer"> 
</p>
      <p>Edad:
        <input name="Edad" type="text" id="Edad" value="" size="5" maxlength="3">
</p>
      <p>Educacion:
        <select name="Educacion">
          <option value="">Selecciona una opcion</option>
		  <option value="1">Preparatoria</option>
          <option value="2">Facultad</option>
          <option value="3">Posgrado</option>
          <option value="4">Maestria</option>
          <option value="5">Doctorado</option>
        </select>
      </p>
      <p>Correo Electronico: 
        <input name="Mail" type="text" id="Mail" value="" size="38">
      </p>
      <p align="center">
        <input type="submit" name="Submit" value="     Enviar    ">        
        <input type="reset" name="reset" value="     Borrar     ">
      </p>
    </div>
  </form>
  <p align="left">&nbsp;</p>
</div>
<p></p>
<p></p>
<p></p>
<p></p>

</body>
</html> 
¿Que esta mal?
Tambien como le hago para cuando tengo un radiobutton y lo seleccionen me de cierto valor en el mail lo quiero para determinar si es hombre o mujer.

Última edición por razpeitia; 15/07/2008 a las 21:22