00:00
00:00
Newgrounds Background Image Theme

mishirozen just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Flash Registration Form

12,585 Views | 7 Replies
New Topic Respond to this Topic

Flash Registration Form 2005-07-25 18:02:38


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

Response to Flash Registration Form 2005-07-26 00:22:33


Please specify your question more.

[and just to tell you, i just created this as a well, beginners script kind of thing]

Response to Flash Registration Form 2005-11-23 12:14:47


I have a couple questions. Where is it sending the info to? my emai? it doesnt have my email address. How does it know where the mySQL datebase is? and even if it found the data base you didn't tell us what to name the table, so how would it know what table to use?

Response to Flash Registration Form 2006-06-22 19:31:46


At 11/23/05 12:14 PM, SupaTuna wrote: I have a couple questions. Where is it sending the info to? my emai? it doesnt have my email address. How does it know where the mySQL datebase is? and even if it found the data base you didn't tell us what to name the table, so how would it know what table to use?

Do you have any experience with MYSQL? Basicly if you have a host you have to creat a MYSQL database and your host will be told to you ( i only know this if you are using php my admin) and then you have to enter your username and pass then upload to that host and then in theory if you have done it right, it WILL work.

Great tut man, keep making them :D

Response to Flash Registration Form 2006-06-22 20:06:52


I'm confused what does that do


<3

BBS Signature

Response to Flash Registration Form 2008-01-07 18:41:12


could you post how to make a login form complying with that

Response to Flash Registration Form 2009-10-18 02:02:13


Yeah I'm doing something simmalar and I have had all kinds of problems and no one has been able to help me.

I'm trying to have it just save 5 text feilds to a txt file on my server.
Sounds simmple right?
I have not been able to pull it off.

Response to Flash Registration Form 2009-10-18 08:43:07


Badly written imho - it doesn't explain what you're actually doing in any of the phases, just blindly gives instructions. The layout is atrocious without formatting or use of the available code tags, and the advice given here is just a wee bit dangerous...

At 7/25/05 06:02 PM, bigftballjock wrote: $query = "INSERT INTO user (username, password, email) VALUES('$user','$pass','$email')";

Holy fuck, have you ever heard of SQL Injection!?


...

BBS Signature