PHP / mySQL variable issue with Adobe flash

Status
Not open for further replies.

cvocvo

New Member
Messages
4
Reaction score
0
Points
0
Hi X10. I have an issue with variables being received from PHP in flash. I've had a look through the forums and have been unable to find any threads about this but apologise if there have been and I've just been blind to it.

Basically I have 2 vars sent from flash using POST (user & pass). This is sent to the PHP file which checks a MySQL DB and returns another variable to flash. The variable does not seem to be getting to the flash file.

After going over it with someone on another forum who confirms that it should work I can only guess that it is to do with the set up here.

I am on cossacks (adfree) and the PHP code is
PHP:
<?php

//this pulls the variables from the flash movie when the user
//hits submit.  

$user = $_POST['user'];
$pass = $_POST['pass'];

//connect to mysql

$username = "cvocvo"; 
$password = "******"; 
$server = "localhost"; 
$mysqlconnection = mysql_connect($server, $username, $password);
if (!$mysqlconnection) {
   die('There was a problem connecting to the mysql server. Error returned: '. mysql_error());
} 

//select database

mysql_select_db("cvocvo_accounts") or die ("no database");

//make query

$query = "SELECT * FROM users WHERE user = '$user' AND pass = '$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.&checklog=2"; <<<<<<<<
}
?>
It is the variable checklog indicated by the arrows above that are not being received. I have been able to verify the script works and the databases are being connected right up to that point.

Any ideas (or confirmation that this is not possible on X10 adfree) would be greatly appreciated.

PS - I am on the intermediate PHP version. I don't believe the advanced version would make a difference but I'm not 100% sure. Edit - I have now put a request in to see if this is the case.

Regards,

Chris.
 
Last edited:
Status
Not open for further replies.
Top