Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

php flash intergration

  • 25-04-2006 01:06PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 99 ✭✭roastie


    never mind got it all sorted out.


Advertisement