Foros del Web » Creando para Internet » Flash y Actionscript »

problema flash + php respuesta siempre error de user

Estas en el tema de problema flash + php respuesta siempre error de user en el foro de Flash y Actionscript en Foros del Web. la respuesta de este codigo flash + php es que el usuario es incorrecto por fabor si alguien me ayuda a corregir este error q ...
  #1 (permalink)  
Antiguo 26/01/2011, 17:17
 
Fecha de Ingreso: enero-2011
Mensajes: 1
Antigüedad: 13 años, 3 meses
Puntos: 0
Pregunta problema flash + php respuesta siempre error de user

la respuesta de este codigo flash + php es que el usuario es incorrecto por fabor si alguien me ayuda a corregir este error q llevo unos dias intentando corregirlo

codigo flash

boton login acciones:
on (press) {
login( user , pass);
}

boton clear acciones:

on (press) {
Cclear(user, pass, status);
}


fotograma acciones:

function login(user, pass) {
// create a new LoadVars Object
myvars = new LoadVars();
// set variables in that objec
myvars.user = user;
myvars.pass = pass;
// When you receive data back, execute the function action ()
myvars.onLoad = action;
// Send the variables and wait for the response.
// The random fake variable is attached to prevent caching the response data
myvars.sendAndLoad("secure_login.php", myvars);
}
function action() {
// Check the response
if (myvars.response == "ok") {
// if the response was "ok", proceed to the secured area
status = "Bienvenido, "+user;
;

} else {
// else show the error status
status = myvars.response;
}
}
// Stop the movie here
function Cclear(user, pass, status) {
username.text = "";
password.text = "";
estado.text = "";
clearInterval(Interval_id);
}
stop();

php:

<?php
// SET THE CORRECT USERNAME AND PASSWORD
$correct_user = "ruben";
$correct_pass = "3321";

// Checkif the username is correct
if ($user==$correct_user){
//IF the username is correct, check the password
if ($pass==$correct_pass){
//If the password is correct, return "ok"
$response="ok";
} else {
//Else the password is wrong
$response="Error pass";
}
} else {
//If the username is wrong
$response="Error user";
}
//Return the response to Flash
print "&response=".$response."&";
?>

Etiquetas: diseño, flash, php
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:48.