First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Jeffrey F. Hill | Website: http://www.snowvids.com

User Registration

PHP used in the first Registration section

$query = "INSERT INTO $table (Name, Object1, Object2, Object3, Comment) VALUES ('$RegName' , '', '', '', 'Hello')";
$result = mysql_query($query);

 This will create a new entry in the database for a new user.  The only value we have to worry about for now is the Name variable which will be set to the Name entered in the Flash Movie in the text field Named RegName.  All other variables will be set later.  The name column was defined as being unique when we created the mySQL table so there can only be one User with that Name.  If someone else try's to register with that name they will not be able to. The second line of the above code is what actually performs the query.  The only thing that's returned to the Flash movie at this point is a message to the user proclaiming that registration was successful - Or failed if the Name already exists in the database. You can see how this is done in the actual script. 

Flash Actionscript Used in Registration

All that is required in Flash at this point is to have one text Field Named RegName - Then either on a button or Frame command this Code. 

on (release) {
	Status = "Beginning registration Process... Please Hold";
	loadVariablesNum ("Register.php?RegName="+RegName, 0);
}

I have an extra text field named Status - but this is optional.  Notice on the LoadVariablesNum command I specifically pass the variable RegName to the PHP script.  This is not necessary, adding "Post" will do the same thing. It's just sometimes easier to keep track of what's passed to a script in this way. After a user has entered their Name and hit the register button the LoadVariablesNum Command will call the PHP script, pass whatever was entered in the RegName Field to it and execute the statements. 

» Level Advanced

Added: 2001-07-03
Rating: 8 Votes: 116
(10 being the highest)
» Author
No details available.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.