Hello everyone, I am trying to make a sign up form for my website in flash. It is an assignment in my webclass. I need to have a field for account name, xfire name, email adress, rank, and why should we accept you. I need to then have acess to this data for recruiting purposes. I belive this is possible with the mysql database we have here at frihost which is where i moved my site to.
Http://www.roguemob.net let me know what you think and maybe give me a link to a tutorial on how to accomplish this task. I will give 15fri$ for whoever can give me a link or explain how to accomplish this sucsssfully first come first get. First thing I read that works.
the macromedia guide book thing has a whole chapter on forms in flash
thats what i used, but i just got confused....
|eepman wrote: |
Now, a short explanation on how this could work:
In Flash you obviously need the input fields for the users details; and a submit button. I'm sure you can make that, the problem is submitting.
There are two ways you can submit - either you get sent an email, or the information is - as you suggested - saved to a MySQL database. Both of these require a php file, first off the php file needs to have the variables that the user submitted in Flash.
To send to the php file use something like this:
// Use this:
// Or this:
var dataSend = new LoadVars;
dataSend.name = _root.name;
dataSend.email = _root.name;
dataSend.sendAndLoad("myFile.php", dataSend, "POST");
If you use the first method (GET method - the latter being a POST method) you don't have to use loadVariablesNum for this, another one of the various data-sending functions will do fine, I just prefer to use loadVariablesNum for this kind of thing because then you can output a status from the php file and Flash will load it in (for example, if there's an error then you can tell Flash).
To receive the variables in the php file use:
// For the GET method
$name = $HTTP_GET_VARS['name']; // This receives the variable "name"
// For the POST method
$name = $HTTP_POST_VARS['name'];
// I think you can also use, but don't hold me to it:
$name = $_GET['name'];
$name = $_POST['name'];
Then you have variables within your php file. I don't know whether you know how to send mail from php, or how to access and modify a MySQL database; take a look here, MySQL database stuff is more complicated than simply sending yourself an email with the users input; use www.php.net for reference.
yea, i hate coding in flash now, its just a gfx program for me now, use better programing launguages
Flash has to have one of the most basic programming languages there is... AS is so easy to learn...and there’s not much you can’t do with it. I only use flash to program really.
|m-productions wrote: |
|Flash has to have one of the most basic programming languages there is... AS is so easy to learn...and there’s not much you can’t do with it. I only use flash to program really. |
Yeah, you're right there. I think learning Flash ActionScript is actually a really good place to start scripting. It gives you a good understanding of the way different script languages work, how they are structured, what functions are available and what cannot be achieved (amongst a whole host of other things).
i just cant stand it....i guess it just seems 2 simple for me, i dont feel like im doing anything