Flex login app help

I have a adobe AIR application and I wanted to add a login script to it. So this is what I came up with and I can’t figure out why it wouldn’t return anything. Help would be much appreciated.

<?php 
		$dbhost = '127.0.0.1';
		$dbuser = 'root';
		$dbpass = '1111';
		$dbname = 'flex';
	
	$conn = sprintf("mysql_pconnect('%s', '%s', '%s')", $dbhost, $dbuser, $dbpass);
	if (!$conn) 
		{
			exit("Unable to connect to DB: " . mysql_error());
		}
	
	if (!sprintf("mysql_select_db('%s')", $dbname)) 
		{
			exit("Unable to select mydbname: " . mysql_error());
		}
		
	$users = cw_sql_query('SELECT * FROM volunteer_users');
	while(list($pos, $user)=each($users))
	{
		if($_REQUEST["username"]=$user["username"])
		{
			if($_REQUEST["password"]=$user["password"])
			{
					echo("1");
			}
			else
			{
				echo("0");
			}
		}
		else
		{
			echo("0")
		}
	}
	function cw_sql_query($info)
	{
		global $conn;
		$query = mysql_query($info);
		dump($query);
		$results = array();
		while ($result = mysql_fetch_assoc($query))
		{	
			
			array_push($results, $result);
		}
		mysql_free_result($query);
		Return($results);
	}
	
?>

Any error messages?
is the page just blank?

Also not sure why you are connecting to the database the way you are. Don’t need to use the sprintf instead you could just use

$conn = mysql_pconnect($dbhost, $dbuser, $dbpass)

Yes just blank and it is connecting that way because i needed it to on conn.php page to get the switch statement to work and I simply copied from there for this. and if your not familiar with flex it will request using this URL: http:/dir/login.php?username=sritsema&password=corbin

fixed it

Sponsor our Newsletter | Privacy Policy | Terms of Service