Forum Topic: Flash Registration Form

(3,917 views • 8 replies)

This topic is 1 page long.

<< < > >>
None

bigftballjock

Reply To Post Reply & Quote

Posted at: 7/25/05 06:02 PM

bigftballjock NEUTRAL LEVEL 04

Sign-Up: 02/23/05

Posts: 138

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


None

cherries

Reply To Post Reply & Quote

Posted at: 7/26/05 12:00 AM

cherries LIGHT LEVEL 18

Sign-Up: 06/07/05

Posts: 4,573

sooooo what do I do?


None

bigftballjock

Reply To Post Reply & Quote

Posted at: 7/26/05 12:22 AM

bigftballjock NEUTRAL LEVEL 04

Sign-Up: 02/23/05

Posts: 138

Please specify your question more.

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


Questioning

SupaTuna

Reply To Post Reply & Quote

Posted at: 11/23/05 12:14 PM

SupaTuna NEUTRAL LEVEL 19

Sign-Up: 06/18/04

Posts: 628

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?


None

Plumb

Reply To Post Reply & Quote

Posted at: 6/22/06 07:31 PM

Plumb NEUTRAL LEVEL 07

Sign-Up: 05/06/06

Posts: 132

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


None

omfgItsZoidy

Reply To Post Reply & Quote

Posted at: 6/22/06 08:06 PM

omfgItsZoidy FAB LEVEL 04

Sign-Up: 01/05/06

Posts: 1,962

I'm confused what does that do

<3

BBS Signature

None

comkidwizzer

Reply To Post Reply & Quote

Posted at: 1/7/08 06:41 PM

comkidwizzer NEUTRAL LEVEL 01

Sign-Up: 01/07/08

Posts: 1

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


None

djbdr248

Reply To Post Reply & Quote

Posted at: 10/18/09 02:02 AM

djbdr248 EVIL LEVEL 11

Sign-Up: 08/07/07

Posts: 879

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.


None

KaynSlamdyke

Reply To Post Reply & Quote

Posted at: 10/18/09 08:43 AM

KaynSlamdyke LIGHT LEVEL 16

Sign-Up: 06/25/04

Posts: 4,926

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!?

Current build for ThreedeeTiles : Monkey
Previous: Lamprey, Mountain Goat (Dead Fork)


All times are Eastern Standard Time (GMT -5) | Current Time: 02:19 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!