Código :
var submit:Object = new Object(); var enviar:LoadVars = new LoadVars(); var recibido:LoadVars = new LoadVars(); submit.click = function(){ enviar.nombre = campo.text; enviar.sendAndLoad("prueba.php", recibido, "POST"); } recibido.onLoad = function(exito){ if(exito){ respuesta.htmlText = true; respuesta.htmlText = this.mensaje; } else{ respuesta.htmlText = true; respuesta.htmlText = "error"; } submit.addEventListener("click",submit);
en el archivo php tengo:
Código :
<? if($_POST['nombre'] == "daniel"){ echo "&mensaje=si&"; } else{ echo "&mensaje=no&"; } ?>
yo coloco el nombre daniel en el campo de texto en flash pero la respuesta que consigo es NO es decir pareciese que no recibe la variable desde el post, por favor he estadoi batallando con esto y el error no lo veo aparentemente esta todo bien, pero bueno cualquier ayuda gracias