Is there any way to handle the response for the wwwform we are using add.form method and there is no way to validate the data insertion we cant say the values are entered into database or not is there any way to check the response?
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class LoadOnClicktes : MonoBehaviour {
public Text box1;
bool ch=false;
// Use this for initialization
string url1="*******/index.php";
// Update is called once per frame
public void LoadScene(int score1)
{
string kill = box1.text;
Debug.Log (kill);
int sco = Player.score;
Debug.Log (sco);
WWWForm form = new WWWForm ();
form.AddField ("name", kill);
form.AddField ("score",sco);
WWW WWW = new WWW (url1, form);
Debug.Log ("Done");
ch = true;
}
/*void OnGUI(){
if(ch)
GUI.Window (0, new Rect ((Screen.width / 2) - 150, (Screen.height / 2) - 75
, 300, 250), ShowGUI, "");
}
void ShowGUI(int windowID)
{
// You may put a label to show a message to the player
GUI.Label(new Rect(65, 40, 200, 30), "Score Submitted");
// You may put a button to close the pop up too
if (GUI.Button(new Rect(50, 150, 75, 30), "OK"))
{
ch = false;
// you may put other code to run according to your game too
}
}*/
}