How do I get variables back from PHP?

Get help using Construct 2

Post » Mon Jun 16, 2014 1:29 pm

Hello! I am new to Construct 2 and far more used to languages and IDE's like Unity3D (Which helped boost my C# knowledge) and Flash AS3, however - Construct 2 harkens back to how I got my start programming with application builders like Multimedia Fusion. So far, I've set up a basic configuration with login/etc screen and all. However.. I can hit "Login" and get back strings, but text refuses to display any output variables with AJAX.LastData, which is rather strange.

For instance, the string output like this:
echo "{'User': '" . $UserName . "', 'Email':'[email protected]'}";

This how it gets back into Construct 2: {'User': '', 'Email':'[email protected]'}.

So... AJAX.LastData is working, but it only sees solid strings, not variables which I know are being -sent-. One is a "task" var that will change what happens, standard. What am I doing wrong?
B
5
Posts: 7
Reputation: 237

Post » Mon Jun 16, 2014 1:35 pm

And now I feel stupid. Little more testing... putting the variable definition into the function being called by Task suddenly gets results.
Okay, so that one was entirely my fault - I've been working with frameworks for far too long and not with raw PHP enough.
B
5
Posts: 7
Reputation: 237


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests