Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Login: Using Flash & PHP

  • 20-02-2008 08: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, Registered Users 2 Posts: 6,758 ✭✭✭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
Advertisement