I’m running some PHP scripts on localhost for testing. All is good when I use a web browser to run them. When I try to fire them off in Unity over a WWW object…
if(verified)
{
WWWForm form = new WWWForm();
form.AddField("user", user);
form.AddField("password", password);
form.AddField("email", email);
www = new WWW("localhost/Mall/CreateBasic.php", form);
sending = true;
Debug.Log ("Sending...");
StartCoroutine(SendData(www));
}
And
IEnumerator SendData(WWW www)
{
yield return www;
}
For reference. There’s additional code to make it wait until something comes back, which in Unity is always