Guys I'm doing the following:
void Start () {
StartCoroutine (Login ());
}
IEnumerator Login() {
WWWForm formData = new WWWForm ();
formData.AddField ("user", "asfas");
formData.AddField ("pass", "safas");
WWW webReq = new WWW ("http://www.mysite.com/register/login_body.php", formData);
yield return webReq;
Debug.Log (webReq.text);
}
The php script displays two input boxes for username and password and there's a button to login. It prints out an error if the credentials are invalid. Currently my code is printing out the html code of this ui and not the result of the actual login ("login successful"). How do you do the whole wwwform and www thing when the php script has a ui?
↧