- Home /
Question by
espotori · Sep 09, 2014 at 06:38 PM ·
javascriptloginmysqlauthenticationuser
MYSQL for webplayer
Hello,
I am making interactive website using unity engine. I scripted the login system core based on variables. Its very simple. I need to learn how to use mysql datas rather than simple UnityScript variables. I read some posts about mysql so people saying that its unsecure because when people crack your application they can learn your mysql ip and password etc. I wont have any problems like that since it is going to be only webplayer. So how can i use mysql with my login panel?
#pragma strict
var username : String = "Username";
var password : String = "Passwd";
var LoginAuth : boolean = false;
var ShowLP : boolean = true;
function OnGUI () {
if (ShowLP == true)
{
username = GUI.TextField (Rect (10, 10, 200, 20), username, 25);
password = GUI.PasswordField (Rect (10, 40, 200, 20), password, "*"[0], 25);
if (GUI.Button (Rect (10,70,60,25), "Login"))
{
if (username == "esporta" && password == "emre2442")
{
print ("User Authed");
LoginAuth = true;
ShowLP = false;
}
}
}
if (ShowLP == false)
{
GUI.Box (Rect (10,10,150,100), "Profile");
}
}
Comment
Plenty of tutorials for that... http://www.cs.vu.nl/~eliens/.CREATE/local/essay/09/nm2/klitsie-joost.pdf
Your answer
![](https://koobas.hobune.stream/wayback/20220613162649im_/https://answers.unity.com/themes/thub/images/avi.jpg)