Useer creation failed. Error #
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext() (at Assets/Registration.cs:26)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
what is the problem
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Registration : MonoBehaviour {
public InputField nameField;
public InputField passwordField;
public Button submitButton;
public void CallRegister() {
StartCoroutine (Register ());
}
IEnumerator Register() {
WWWForm form = new WWWForm();
form.AddField (ânameâ, nameField.text);
form.AddField (âpasswordâ, passwordField.text);
WWW www = new WWW (âhttp://localhost/sqlconnect/register.phpâ,form);
yield return www;
if (www.text == â0â) {
Debug.Log (âUser created succesfullyâ);
UnityEngine.SceneManagement.SceneManager.LoadScene(0);
} else {
Debug.Log (âUseer creation failed. Error #â + www.text);
}
}
public void VerifyInputs()
{
submitButton.interactable = (nameField.text.Length >= 8 && passwordField.text.Length >= 8);
}
}