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: S.Saipriya
» Title: Flash Fire Effect
» Description: This tutorial explains about how to create Fire Effect in Flash of Actionscript 2.0.I hope this tutorial helps you!
Featured Sound Loops
Image for equalize

Audio Player

» Author: Aidan Crouzet-Pascal
» Title: Falling Star
» Description: This loop is a cool sounding, E minor loop.
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: Brandan Paulin
» Description: Epic sounding loop with Brass, Percussion, Strings and Winds. This is actually part of a Loop Pack called the Coming where you can download the rest of the loops that go with it FREE from my website.