utterly confused about ajax

Post » Wed Mar 29, 2017 7:54 pm

So I'm trying to make a really simple ajax request with a score and a name. Everything I've looked up suggests what I have is correct, but C3 says it's not valid.

I'm putting the method as POST with a data string like this:
"score=" &Score & "name=" &highscorename.Text

I've read lots of guides saying to use URLEncode, but that doesn't apply, since it's POST and not GET. Every time I check the $_POST['name'] in PHP it's empty, but $_POST['score'] comes up as say "462.66792name=liam" for example. What am I missing to split them?

UPDATE: FIXED.

It needed to be this:
"score=" &Score & "&name=" &highscorename.Text
B
4
S
2
G
5
Posts: 346
Reputation: 2,417

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest