Ok, no offense to the kirupian who wrote the authentication tutorial, i’m probably missing something small and stupid but is the php right?? i’m using:
<?
$user=$_POST['user'];
$pass=$_POST['pass'];
//connect to database
if ($user && $pass){
mysql_pconnect("localhost","myuser","mypassword") or die ("didn't connect to mysql");
mysql_select_db("mydatabase") or die ("no database");
//make query
$query = "SELECT * FROM users WHERE username = '$user' AND password = '$pass'";
$result = mysql_query( $query ) or die ("didn't query");
//see if there's an EXACT match
$num = mysql_num_rows( $result );
if ($num == 1){
print "status=You're in&checklog=1";
} else {
print "status=Sorry, but your user name and password did not match a user name/password combination in our database. Usernames and passwords are entered in from a different file. Thank you for visiting test login script!!&checklog=2";
}
}
?>
now the problem is that the checklog function will not work in my flash app. , yet the “you’re in” shows up in the status textbox. Is that the proper way to set a variable that flash can read? I know “&” is neccessary, but should it be spaced from You’re in or should it be a function or am I going crazy:puzzle: Or…is the php right and somethings wrong with the swf file?
sorry if this is a double post, i just figured the server-side area might get people who know php a little better.
Thanks in advance!