Is this Ajax Post to URL line ok???

Get help using Construct 2

Post » Sat Jun 01, 2013 11:18 am

Hi Guys,

Im trying to post score to database through Post to URL and I'm using this line:

"http://www.mysite.com/game/test.php?score=Score"

Thats exactly what I'm writting in the URL field (including the quotes).

Score is the name of the Global Variable holding the score, but this is not working.

Ill really appreciate your help.

B
5
Posts: 23
Reputation: 821

Post » Sat Jun 01, 2013 1:16 pm

Never used the Ajax object, but try:

"http://www.mysite.com/game/test.php?score="Score
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Sat Jun 01, 2013 1:27 pm

[QUOTE=Aphrodite] Never used the Ajax object, but try:

"http://www.mysite.com/game/test.php?score="Score
[/QUOTE]

[code]"http://www.mysite.com/game/test.php?score=" & Score[/code]
Where "Score" is a variable.

Also make sure the application doing the call is hosted on the same URL.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Sat Jun 01, 2013 3:49 pm

Thanks a lot guys, will try that and will let you know, and yest Kyatric I have the App in the same Godaddy hosting and url. Have a great day!
B
5
Posts: 23
Reputation: 821

Post » Mon Jun 03, 2013 4:30 am

Hi guys,

I made it, the solution was as simple as to use only the name of the file I was going to send the score to (instead of http://www.mysite.com/game/test.php I used text.php onlye making sure that the file was going to be in the same directory, now it works.

Thanks!
B
5
Posts: 23
Reputation: 821


Return to How do I....?

Who is online

Users browsing this forum: corpvs2, dop2000, farsen and 28 guests