How do I retrieve more than one data with AJAX?

Get help using Construct 2

Post » Wed Sep 24, 2014 8:02 pm

Hello All,

I starting to use AJAX, and I created a password validation (I'm working with C2-AJAX and PHP).

C2 retrieve the value in AJAX.LastData, and here is stored only 1 value.

My question is how I can receive more than one value from php?
I'm guessing that I should use array...

Does anybody has an example?

Thanks in advance
Image
Image
B
26
S
2
G
1
Posts: 71
Reputation: 2,662

Post » Wed Sep 24, 2014 8:14 pm

From your server, output the data as json or xml and on C2 load those data into objects so you can extract 2 items.
B
32
S
7
G
2
Posts: 317
Reputation: 2,851


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], jezjones24, maranpis and 25 guests