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

Login: Using Flash & PHP

Options
  • 20-02-2008 8:28pm
    #1
    Closed Accounts Posts: 72 ✭✭


    anyone have any example of how to do a login in flash.

    the flash movie will be calling the php file which gets
    the info from the database.


Comments

  • Closed Accounts Posts: 52 ✭✭zardette


    Hi there,

    Is this what you are looking for. Its example code of Login Using Flash, PHP, and MySQL
    authenticate.zip



    Hope this helps,
    Z


  • Closed Accounts Posts: 72 ✭✭fatjose101


    thanks man.
    Does anyone know how once successfully logged in, you can make the php file take you to
    another flash movie on your server.
    here's me php file so far
    <?php
    
    // set your infomation.
    
    $dbhost='localhost';
    
    $dbusername='username';
    
    $dbuserpass='';
    
    $dbname='database';
    
    // connect to the mysql database server.
    
    mysql_connect ($dbhost, $dbusername, $dbuserpass);
    
    if (!mysql_select_db($dbname)) die(mysql_error());
    
    $user = $_POST['user'];
    
    $pass = $_POST['pass'];
    
    $email = $_POST['email'];
    
    
    $query = "INSERT INTO user (username, password, email) VALUES('$user','$pass','$email')";
    
    mysql_query($query) or die(mysql_error());
    echo "$user succussfully registered!";
    ?>
    

    so instead of the php displaying "$user succussfully registered!" i want it to go directly to
    main_page.swf


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    fatjose101 wrote: »
    so instead of the php displaying "$user succussfully registered!" i want it to go directly to
    main_page.swf
    header() function.
    <?php
    header("Location: http://$_SERVER['HTTP_HOST']/main_page.swf");
    exit;
    


  • Closed Accounts Posts: 72 ✭✭fatjose101


    thanks man :)

    LEGEND!


  • Closed Accounts Posts: 81 ✭✭dzy


    Watch out for a bit of the old SQL injection.


  • Advertisement
Advertisement