Correct URL for my php to capture

Get help using Construct 2

Post » Thu Feb 28, 2013 10:09 pm

Hi guys,
I want to capture data when its submitted, here is the process in Construct:

SUBMIT BUTTON - ON CLICKED
AJAX -           POST TO
TAG -           WebStorage.LocalValue("email")
URL -           "http://www.willbrownltd.co.uk/games/random/data/connect.php?email=email.Text"
DATA -           email.Text

Picture link:
http://s150.beta.photobucket.com/user/melonrecords/media/link.jpg.html

Is that url correct as I am telling my php script to "$_GET['email']"

Thanks guys.
Will.will1082013-02-28 22:10:31
B
9
S
1
Posts: 40
Reputation: 1,120

Post » Sat Mar 02, 2013 8:27 pm

Bump.
Thanks guys.
Will.
B
9
S
1
Posts: 40
Reputation: 1,120

Post » Sat Mar 02, 2013 9:26 pm

@will108

If you're usin $_GET on the php side, you want to use the AJAX request URL rather than the Post URL.

To answer your initial question, yes your actual URL looks good.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Sun Mar 03, 2013 12:17 am

That's great, thanks.
It is writing the "email.Text" part of the url, so I know its working but "email.Text" should be dynamic and should be whatever somebody puts in the box.
I though the "tag" would do that, but no, then I though the "DATA" field, but there is no data field when you request a url.
Any thoughts please theubie, or anyone else?
Thanks again, I am so close.
Will.will1082013-03-03 00:18:21
B
9
S
1
Posts: 40
Reputation: 1,120

Post » Sun Mar 03, 2013 12:27 am

Try this:
[code]
"http://www.willbrownltd.co.uk/games/random/data/connect.php?email=" & URLEncode(email.Text)
[/code]
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Sun Mar 03, 2013 12:34 am

What ramones said. Didn't look close enough to the location of your quotation marks.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Sun Mar 03, 2013 1:00 am

Done it!!!
OK, so I did this:
http://s150.beta.photobucket.com/user/melonrecords/media/Untitled-1.jpg.html

Thanks guys, now I can get on with developing games and not php scripts!
Nice.
Woo.will1082013-03-03 19:47:09
B
9
S
1
Posts: 40
Reputation: 1,120


Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt, Matthew de, Skebab and 6 guests