Hi
Currently I have a flash program that tries to create a login system.
But when i click on the flash button, it should call my login.php to valid an existing account in MySQL.
here is a copy of login.php
<?
include("info.php");
$user=$_POST['user'];
$pass=$_POST['pass'];
//connect to database
print "status=testing";
if ($user && $pass){
mysql_pconnect($dbhost,$dbuser,$dbpass) or die ("couldn't connect to mysql");
mysql_select_db("sensors") or die ("no database");
//make query
$query = "SELECT id FROM login WHERE user_name = '$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){
$userid = mysql_result($result,0);
print "status=Login Successful!&checklog=1&userid=$userid";
}
else {
print "status=Sorry, but your user name and password combination was incorrect.&checklog=2";
}
}
?>
Here is a copy of the flash submit button's code
on (release, keyPress "<Enter>") {
if (user != "" && pass != "") {
status = "Begin Login Process - Wait...";
loadVariablesNum("http://localhost/login.php", 0, "POST");
}
}
I've tried it with "login.php" also, to the same result.
What happens it when i click on login, nothing happens. I'm running Apache webserver, with Mysql5 server.
The print "status=testing" is supposed to update my textbox to show the word testing, but even that doesn't happen, which leads me to suspect that the .php isnt even being called at all? 🙁
I am at a lost to as how to go about fixing this urgent problem, please help