Comunidad de diseño web y desarrollo en internet online

Fomrulario de contacto manda mail sin contenido

Citar            
MensajeEscrito el 04 Mar 2011 04:10 pm
hola gente, me esta pasando que el formulario de contacto de mi web, envia el mail al correo destinatario pero en el no se encuentra el contenido de las variables de los campos de texto.
No soy programador, solo manipule como pude el archivo php y el action, por favor si me podrían dar una mano.

codigo del formulario en flash:

stop();
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.sender = nombre.text;
my_vars.subject = asunto.text;
my_vars.email = mail.text;
my_vars.vino = llego.text;
my_vars.message = mensaje.text;
if (my_vars.sender != "" and my_vars.subject != "" and my_vars.email != "" and my_vars.vino != "" and my_vars.message != "" ) {
my_vars.sendAndLoad("mailer.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(3);
};
};
nombre.onSetFocus = asunto.onSetFocus=mail.onSetFocus=llego.onSetFocus=mensaje.onSetFocus=function () {
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};

-----------------------------------------------------------------------

código del archivo php:

<?php

/* ---------------------------
php and flash contact form.
by www.MacromediaHelp.com
---------------------------
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */


// read the variables form the string, (this is not needed with some servers).
$subject = $_REQUEST["asunto"];
$message = $_REQUEST["mensaje"];
$sender = $_REQUEST["nombre"];
$email = $_REQUEST["mail"];
$vino = $_REQUEST["llego"];


// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);
$email = stripslashes($email);
$vino = stripslashes($vino);

// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Formulario de Contacto". $subject;

// send the email, make sure you replace [email protected] with your email address
if(isset($message) and isset($subject) and isset($sender) and isset($email)){
mail("[email protected]", $subject, $message, "From: $sender");
}
?>

*disculpen si no es la categoría correcta.

Gracias.

Por diegolee

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Mar 2011 06:35 pm
Estás poniendo las variables del LoadVars según el nombre de las variables en el script de PHP, pero tienes que ponerlas según lo que dice el Request, ejemplo

my_vars.subject = asunto.text;

debería ser

my_vars.asunto = asunto.text;

Porque en el PHP tomas de la derecha, no de la izquierda:

$subject = $_REQUEST["asunto"];

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 10 Mar 2011 06:42 pm
hola jorge, gracias x tu respuesta....

te cuento q modifique el código del flash, así:

stop();
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.nombre = nombre.text;
my_vars.asunto = asunto.text;
my_vars.mail = mail.text;
my_vars.llego = llego.text;
my_vars.mensaje = mensaje.text;
if (my_vars.sender != "" and my_vars.subject != "" and my_vars.email != "" and my_vars.vino != "" and my_vars.message != "" ) {
my_vars.sendAndLoad("mailer.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(3);
};
};
nombre.onSetFocus = asunto.onSetFocus=mail.onSetFocus=llego.onSetFocus=mensaje.onSetFocus=function () {
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};


pero me sigue llegando como correo no deseado y sin contenido, o poco contenido:

190.231.247.200

hgjghj


se t ocurre algo?

el código del php no lo toque.

gracias.

Por diegolee

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 10 Mar 2011 07:19 pm
Prueba usando

$_POST['asunto'];

en vez de

$_REQUEST["asunto"];

Si lo tienes colgado funcionando en algún lado, pásame la URL y le echo un ojo

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 10 Mar 2011 08:02 pm
hola y gracias.... lo voy a probar ahora

te paso el link:

www.diegoadamo.com.ar

Por diegolee

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 10 Mar 2011 08:09 pm
no funciono, me sigue llegando como no deseado y con pocos datos

190.231.247.200

fgdfgdfgdf


codigo del flash:

stop();
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.nombre = nombre.text;
my_vars.asunto = asunto.text;
my_vars.mail = mail.text;
my_vars.llego = llego.text;
my_vars.mensaje = mensaje.text;
if (my_vars.sender != "" and my_vars.subject != "" and my_vars.email != "" and my_vars.vino != "" and my_vars.message != "" ) {
my_vars.sendAndLoad("mailer.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(3);
};
};
nombre.onSetFocus = asunto.onSetFocus=mail.onSetFocus=llego.onSetFocus=mensaje.onSetFocus=function () {
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};



codigo del php:

<?php

/* ---------------------------
php and flash contact form.
by www.MacromediaHelp.com
---------------------------
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */


// read the variables form the string, (this is not needed with some servers).
$subject = $_POST["asunto"];
$message = $_POST["mensaje"];
$sender = $_POST["nombre"];
$email = $_POST["mail"];
$vino = $_POST["llego"];


// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);
$email = stripslashes($email);
$vino = stripslashes($vino);

// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Formulario de Contacto". $subject;

// send the email, make sure you replace [email protected] with your email address
if(isset($message) and isset($subject) and isset($sender) and isset($email)){
mail("[email protected]", $subject, $message, "From: $sender");
}
?>

Por diegolee

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 10 Mar 2011 08:27 pm
Las variables salen bien de Flash por lo que puedo ver

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.