// username and password sent from form
$myusername=$_POST['
myusername' ];$mypassword=$_POST['
mypassword' ];
You will need to json_decode() the request before you can access the variables within. Further the incoming request JSON should be assigned to a variable (i.e. msg=JSON) so that PHP can fetch it from the $_POST variable.
Frankly, given that you only have two parameters, there is really no reason to JSON encode them. Just POSTing the two parameters as form encoded data would work with your PHP code as written. You can however us JSON to return a response.
Sincerely,
Joseph
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/G88X2-gxMY8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment