Question by
junx92 · Oct 04, 2018 at 03:57 PM ·
unity5phpsqldatabaseregistering
How to call php in unity c#?
my php can communicate with mysql database however my c# script couldn't communicate with php.. please help me
WWWForm form = new WWWForm();
form.AddField("name", _username.text);
form.AddField("pass", Md5Sum(_password.text));
form.AddField("email", _email.text);
form.AddField("key", Md5Sum(_username.text + secretGameKey).ToLower());
WWW www = new WWW(registerURL, form);
yield return www;
Debug.Log("Done!");
string _return = www.text;
string _returnKey = Md5Sum(_username.text + secretServerKey).ToLower();
if (_returnKey == _return)
{
_msg.text = "Registration is complete";
yield return new WaitForSeconds(1);
Application.LoadLevel(Application.loadedLevel);
}
else
{
_msg.text = "Server offline"+_return;
_error = true;
}
Comment
Your answer
Follow this Question
Related Questions
403 Forbidden - PHP,SQL and Unity 0 Answers
JSON Array from server to Unity C# 1 Answer
HELP my unity wont open files ERROR MissingMethodException: Cannot find the requested method. 0 Answers
Scriptable Objects : Out of my depth, Can I take data from them and fill into another class? 1 Answer
wierd lines appear when making a minecraft-like game 0 Answers