Ok well i was wanted to do this for a while about 3 years ago, and since i know how to do it now, and i dont know if anyone else wants to know how to do it but o well.
Flash Registration
In this tutorial I will teach you how to make a registration script in flash.
Required things:
-Flash MX 2004
-Dreamweaver, or any program that can edit php files
-A Mysql Database
-A Website
Ok first off,
Run the following mysql on your database to create the required tables:
Code:
CREATE TABLE user (
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
username TEXT NULL,
password TEXT NULL,
email TEXT NULL);
Now, open up a new flash document.
Create three(3) input text boxes.
label the var for the first one 'user'
label the var the the second one 'pass'
and label the var for the last one 'email' w/out the quotes.
Now create a button, and put in the following actions for it:
Code:
on (release) {
getURL ("register.php", "_blank", "POST");
}
Now, save that file and publish it as whatever you want.
Ok, moving on to the php side.
Open up a new php file, and insert the following script:
PHP:
<?php
// set your infomation.
$dbhost='localhost';
$dbusername='username';
$dbuserpass='password';
$dbname='dbname';
// 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'];
$pass = md5($pass);
$query = "INSERT INTO user (username, password, email) VALUES('$user','$pass','$email')";
mysql_query($query) or die(mysql_error());
echo "$user succussfully registered!";
?>
Now save that file as register.php, and upload it and your flash file to your web server and test it out.
If you need help just contact me and i'll be glad to help you.
Also, you can download this tutorial at: HERE