Hola Necesito que me ayuden con esto ustedes que tienen la vista poderosa:
------------------esto es la pagina web php-----------------------------------------
que es lo que falta que no funciona cuando lo hago correr??!!
------------------------------------------------------------------------------------------
<?php
/*
--- Creado por Adam Khoutry
*/
// crear variables locales de flash ActionScript posted Variables
$senderName = $_POST['UserName'];
$senderMail = $_POST['userEMail'];
$senderMenssage = $_POST['userMsg'];
$senderContry = $_POST['userCountry'];
$senderKids = $_POST['userKids'];
$senderGender = $_POST['userGender'];
$senderNewsletter = $_POST['userNewsletter'];
// strip (quitar/remover) slashes(slash-corte: Cortes) on the local typed-in variable for security and run any (algo) error checkerd here
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);
puedes cambiar estas lineas para tus necesidades
$to = "rubil♪hotmail.com";
$from = "$senderEmail";
$subjct = "prueba de mensajerias";
$nessage = "Resultados de mesajerias :
Name : $senderName
Email : $senderEmail
Country : $senderGender
Numero de Hijos : $senderKids
Gender : $senderGender
Newsletter : $senderNewsletter
their message is bellow:
$senderMessage";
$headers = "From $from\r\n";
$headers = "Content-type: text\r\n";
to = $to";
//Send Email
mail($to,$subject,$message,$headers);
//------------
$my_msg = "gracias $senderName, all data has been sent";
print"returm_msg = $my_msg";
//****
exit();
?>
-----------------------Este es el Formulario hecho con Flash-------------------------
//Hide processing MC
processing_mc.visible=false;--------------------------------------> es el proceso de carga
//----------------------------------------------lista de combobox
function addCountriesToList():void{
countryList.addItem({label:"United States"});
countryList.addItem({label:"Perú"});
countryList.addItem({label:"Mexico"});
countryList.addItem({label:"Brasil"});
countryList.addItem({label:"Japon"});
countryList.addItem({label:"China"});
countryList.addItem({label:"Canada"});
countryList.addItem({label:"España"});
countryList.addItem({label:"U.S.A"});
countryList.addItem({label:"Europeos"});
}
//Run fuction above now ----> corre funcion sobre ahora '???
addCountriesToList();
var variables:URLVariables = new URLVariables;
//Build the varSend Variable ----> Construir la Variable enviar Variable '???
var varSend:URLRequest = new URLRequest("contact.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
//Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE,complete Handler);
//handler for the php script completion and return of status
function completeHandler(event:Event):void{
//remove processing clip
processing_mc.visible = false;
name_txt.text="";
email_txt.text="";
msg_txt.text="";
kids.value=0;
checkBox.selected=false;
//Load the response from php here
status_txt.text = event.target.data.return_msg;
}
//add event listener for submit buttom click
submit_btn.addEventListener(MouseEvent.CLICK,Valid ateAndSend);
//Funcion ValidateAndSend
function ValidateAndSend(event:MouseEvent):void{
//validate fields
if(!name_txt.length){
status_txt.text= "Por favor escriba su nombre";
}else if(!email_txt.length){
status_txt.text= "Por favor escriba su email";
}else if(!msg_txt.length){
status_txt.text= "Por favor escriba su mensaje";
}else {
//All is good, send the data now to PHP
processing_mc.visible=true;
//ready else condition for error hending
variables.userName = name_txt.text;
variables.userEmail = email_txt.text;
variables.userMsg = msg_txt.text;
variables.userCountry = countryList.value;
variables.userKids = kids.value;
variables.userGender = radioGroup.value;
variables.userNewsletter = checkBox.selected;
//Send the data to php now
varLoader.load(varSend);
}//close else condition for error handing
}//close valider and send Funtion