Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php flash intergration

Options
  • 25-04-2006 1:06pm
    #1
    Registered Users Posts: 99 ✭✭


    im new to php and i was just wonder how i send varibles back to a text field in flash. im doing a login/register for a site and was wondering how i return a value into a text field .


    [PHP]
    <?php
    $user=$_POST;
    $pass=$_POST;

    //connect to database
    $host = 'localhost';
    $dbuser = '';
    $dbpass = '';
    $dbname = '';
    $table = '';
    $db = @mysql_connect($host,$dbuser,$dbpass) or die("error=could not connect to $host");
    $db = mysql_select_db($dbname) or die ("no database");



    //make query
    $query = "SELECT * FROM yourtable WHERE username = '$user' AND userpassword = '$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 "You're in";
    }
    else
    {
    print "Sorry, but your user name and password did not match a user name/password";
    }
    }

    ?>
    [/PHP]
    this is how i access the php file


    loadVariablesNum("login.php", 0, "POST");
    


Comments

  • Registered Users Posts: 99 ✭✭roastie


    never mind got it all sorted out.


Advertisement