Zurück   Flashforum > Flash und Server > Flash und Datenbanken

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 29-04-2009, 05:44   #1 (permalink)
Neuer User
 
Registriert seit: Feb 2009
Beiträge: 13
Flash PHP sendet nicht alle daten

Hallo, habe ein mächtiges Problem mit meinem PHP script….

Alles klappt , bis auf das Flash nicht die „users information“ bekommt und richtig darstellt,
ich brühte aber komme aber nicht darauf…. Bin aber auch nicht die absolute leuchte in PHP,

wie kann es sein, der befehl : >>>echo "&msgText=Entrance Granted!";<<< wird gesendet und kommt auch zur Ausführung,
die Daten des „Users“ erscheinen nicht,

Bitte um Hilfe, ich schaffe es einfach nicht…. kann mir jemand den fehler sagen.

Vielen Dank

KB

Hier meine PHP :

<?php
//include the connect script
include "connect.php";
//Post Variables from flash
$username = trim(addslashes($_POST['username']));
//Encrypt the password with md5
$password = md5(trim($_POST['password']));
//Select all names and passwords that are equal to what the user entered.
$sql = mysql_query("SELECT * FROM $tableName WHERE Username = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error());
$row = mysql_fetch_array($sql);
// now we check if they are activate
if($row['active'] > 0)
{
//Send all of the users information to flash
$arr = mysql_fetch_array($sql);
/*Gather all of the users information to display it in flash*/
$fname = $arr[3];
$lname = $arr[4];
$user = $arr[1];
$email = $arr[5];
$phone = $arr[6];
$address = $arr[7];
$city = $arr[8];
$state = $arr[9];
$zip = $arr[10];
/*NOTE! Message: Entrace Granded! activate the login aktion in flash*/
echo "&msgText=Entrance Granted!";
echo "&whosIn=$fname $lname";
echo "&fName=$fname";
echo "&lName=$lname";
echo "&userName=$user";
echo "&email=$email";
echo "&phone=$phone";
echo "&address=$address";
echo "&city=$city";
echo "&state=$state";
echo "&zip=$zip";
}
else {
//If their was no match echo Invalid login and let flash take over from here.
echo "&msgText=invalid / ...not active";
}

?>
kinabalu ist offline   Mit Zitat antworten
Alt 03-05-2009, 13:57   #2 (permalink)
Neuer User
 
Registriert seit: Feb 2009
Beiträge: 13
Question update

Hi, just update ...
habe meinen fehler gefunen …
nun geht's wenn ich meine flash in einer html seite einbinde und zum test hochlade 100% ohne probleme;
wenn ich aber versuche meinen login in meine flash website einzubinden, bekomme ich den zugang = flash geht zum richtigen ( login ) bereich,
aber zeigt mir wieder keine daten des Users an

was ist da faul ? muss ich etwas noch mitangeben ?


thanks for any help
Chris

PHP-Code:
<?php
//include the connect script
include "connect.php";
//Post Variables from flash 
$username trim(addslashes($_POST['username']));
//Encrypt the password with md5 
$password md5(trim($_POST['password'])); 
//Select all names and passwords that are equal to what the user entered.
$sql mysql_query("SELECT * FROM $tableName WHERE Username = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error());
$row mysql_fetch_array($sql);
// now we check if they are activate 
if($row['active'] > 0)
{
//Send all of the users information to flash 
///  >>>>forgot to insert <<<<<
$sql mysql_query("SELECT * FROM $tableName WHERE Username = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error());
/// >>>>end<<<<<
$arr mysql_fetch_array($sql);
/*Gather all of the users information to display it in flash*/
$fname $arr[3];
$lname $arr[4];
$user $arr[1];
$email $arr[5];
$phone $arr[6];
$address $arr[7];
$city $arr[8];
$state $arr[9];
$zip $arr[10];
/*Message: Entrace Granded! Activate the login action in flash*/ 
echo "&msgText=Entrance Granted!";
echo 
"&whosIn=$fname $lname";
echo 
"&fName=$fname";
echo 
"&lName=$lname";
echo 
"&userName=$user";
echo 
"&email=$email";
echo 
"&phone=$phone";
echo 
"&address=$address";
echo 
"&city=$city";
echo 
"&state=$state";
echo 
"&zip=$zip";

else {
//If their was no match echo Invalid login and let flash take over from here.
echo "&msgText=invalid / ...not active";
}

?>
kinabalu ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
as2, flash, php, senden

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 00:17 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele