4 Replies - 2072 Views - Last Post: 21 June 2011 - 12:47 PM

#1 puyunk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 27-April 11

How to send login data to database?

Posted 16 June 2011 - 08:04 PM

Hi there again.. :D
Anybody know any tutorial or example in how to send login data (containing name, password and ID) to database? I am really blank in this..

Thanks in advance.. :D Good day

Is This A Good Question/Topic? 0
  • +

Replies To: How to send login data to database?

#2 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2531
  • View blog
  • Posts: 4,631
  • Joined: 24-September 10

Re: How to send login data to database?

Posted 17 June 2011 - 06:31 AM

AS2 or AS3?
Was This Post Helpful? 0
  • +
  • -

#3 puyunk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 27-April 11

Re: How to send login data to database?

Posted 17 June 2011 - 08:56 PM

If we can use AS2 then AS2, since for the other movie (.swf files), I used AS2..

Is it okay to combine movie clip from different AS??

This post has been edited by puyunk: 17 June 2011 - 08:57 PM

Was This Post Helpful? 0
  • +
  • -

#4 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

Reputation: 192
  • View blog
  • Posts: 725
  • Joined: 22-December 08

Re: How to send login data to database?

Posted 18 June 2011 - 03:38 AM

View Postpuyunk, on 18 June 2011 - 09:26 AM, said:

If we can use AS2 then AS2, since for the other movie (.swf files), I used AS2..

Is it okay to combine movie clip from different AS??


First, its not possible to mix AS 2.0 and AS 3.0.

Secondly, what you want to do is possible in AS 2.0. You want to send login data from flash to a database...lets say MySQL database. Remember, flash cannot directly communicate with the mySQL db. So you need an intermediate program that talks to both. A good choice for such intermediate is PHP. The communication then takes places as follows :

AS 2.0 -sends data to -> PHP -stores data in -> MySQL

A good tutorial on how to achieve this can be found here. It teaches you how to send data from AS 2.0 to PHP.

Now when PHP recieves the data, you want to store it in the DB. Read here on how to that.

Hope it gets you started.
Was This Post Helpful? 0
  • +
  • -

#5 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: How to send login data to database?

Posted 21 June 2011 - 12:47 PM

envelope = new LoadVars();
var1 = gg.toString();
envelope.variable1 = var1;
var2 = tt.toString();
envelope.variable2 = var2;
var3 = ww.toString();
envelope.variable3 = var3;
var4 = wx.toString();
envelope.variable4 = var4;
var5 = wy.toString();
envelope.variable5 = var5;
var6 = wd.toString();
envelope.variable6 = var6;
var7 = wr.toString();
envelope.variable7 = var7;
var8 = wa.toString();
envelope.variable8 = var8;
var9 = na.toString();
envelope.variable9 =var9;





envelope.sendAndLoad('http://example.com/script.php', envelope, 'POST');


This post has been edited by macosxnerd101: 21 June 2011 - 01:02 PM
Reason for edit:: CODE TAGS!!! USE THEM!!!

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1