Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2007, 00:21
SICK-BOY
 
Fecha de Ingreso: octubre-2005
Mensajes: 419
Antigüedad: 18 años, 6 meses
Puntos: 0
Script mailer super sencillo ke no entiendo por ke no funciona!

hola.
miren cree este mailer en php por ke en realidasd no necesitaba algo grande alcontrario lo mas posible posible...

antes me funcionaba bien pero ya no... aca les dejo los codigos
mailer.php
Código PHP:
<form method="POST" action="enviado.php">

<
head>
<
title>xxx</title>
<
style type="text/css">
<!--
body {
background-color:#FFFFFF
}
td {
background-color:#FFFFFF;
}

inputselecttextarea {
background-color#FFFFCC;
border#009900 1px solid;
font-size:10px
}

a:linka:visited {
color:#FFFFFF;
font-weight:bold;
text-decorationnone;
}

a:hover {
text-decoration:underline;
}

-->
</
style>
</
head>

<
body bgcolor="fff">

<
p><b><font style="font-size:12px; font-family:Arial, Helvetica, sans-serif">&#9658; Ponte en Contacto con tu Presidente.</font></b></p>
                                      
<div align="center">
                                        <
center>
                                      <
table border="0" width="400px" cellspacing="0" cellpadding="0" height="223">
                                        <
tr>
                                          <
td width="100%" bgcolor="fff" height="223">
                                            <
table border="0" width="100%" cellspacing="1" cellpadding="0" height="103">
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Nombre:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="nombre" size="60"></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">E-mail:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="email" size="60" ></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                  <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Direccion:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="direccion" size="60"></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Telefono:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="telefono" size="60" ></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Ciudad:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="ciudad" size="60" ></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Estado:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<input type="text" name="estado" size="60" ></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="25">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Asunto:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;
                                                  <
select size="1" name="asunto" >
                                                    <
option selected>Seleccione</option>
                                                    <
option>Peticiones</option>
                                                    <
option>Quejas</option>
                                                    <
option>Sugerencias</option>
                                                    <
option>Otros..</option>
                                                </
select></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="56">
                                                <
p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Mensaje:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="56">&nbsp;<textarea rows="10" name="mensaje" cols="55" ></textarea></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="43">&nbsp;</td>
                                                <
td width="72%" bgcolor="#fff" height="43">&nbsp;<input type="submit" value="Enviar" name="enviar">
                                                  <
input type="reset" value="Borrar" name="borrar"></td>
                                              </
tr>
                                            </
table>
                                          </
td>
                                        </
tr>
                                      </
table>
                                        </
center>
                                      </
div>
                                    </
form

enviado.php
Código PHP:
<?php

//E-mail en donde se recibirá el Formulario.

$recipiente "[email protected]";

//URL de tu Sitio Web.

$sw "http://www.xxx.org/";

//Mensaje que te llegará al Correo, con los datos ingresados.

$msg "El Sr/Sra $nombre, se desea poner en contacto con usted, y envia el siguiente mensaje con los siguientes datos:\n\n\n

   Nombre: $nombre
    Email: $email
Direccion: $direccion
 Telefono: $telefono
   Ciudad: $ciudad
   Estado: $estado
   Asunto: $asunto
  Mensaje: $mensaje\n\n"
;

//Comprobamos que los campos del formulario se encuentren completos.

if (empty($nombre)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado tu Nombre.</b></font></p>"
;
}
if(empty(
$email)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado tu E-mail.</b></font></p>"
;
}
if(empty(
$direccion)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado una direccion.</b></font></p>"
;

if(empty(
$telefono)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un telefono.</b></font></p>"
;

if(empty(
$ciudad)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado una ciudad.</b></font></p>"
;

if(empty(
$estado)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un estado.</b></font></p>"
;

if(empty(
$asunto)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un Asunto.</b></font></p>"
;

if(empty(
$mensaje)){
echo 
"<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado el Mensaje.</b></font></p>"
;
}else{

//Limpiamos de posibles ataques.

$mensaje ereg_replace("\r\n","<br>"$mensaje);

$nombre htmlentities($nombre);
$email htmlentities($email);
$direccion htmlentities($direccion);
$telefono htmlentities($telefono);
$ciudad htmlentities($ciudad);
$estado htmlentities($estado);
$asunto htmlentities($asunto);
$mensaje htmlentities($mensaje);

//Enviamos el E-mail con todos los datos.

mail("$recipiente""$asunto""$msg""FROM: $email");

//Damos las gracias al visitante por contactarnos.

echo"<font face=tahoma size=2>
<p align=center>Gracias <b>$nombre</b>. 
<p align=center>Tu Mensaje ha sido enviado con exito!<br>
En unos instantes mas el xxx, tendra en sus manos el comentario para ofrecerte una respuesta.<br>
<br>
<b>G r a c i a s !</b><br>
<br>
<br>
</p>
<p align=center><br>
<a href='http://www.xxx.org/' target='_top'>Regresar a la Pagina Principal</a>.</p>"
;
}
?>
cuando lleno todos los campos y doy en enviar me aparecen ke no llene ningun campo...

aver si alguno de ustedes sabe cual puede ser el problemita... saludos
__________________
GraficasWeb.com / Diseño y Desarrollo Web en Mexico
info @ graficasweb.com E-mail / MSN