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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

php flash intergration

  • 25-04-2006 12: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