Unity & MySQL Databases, Part 4: User Login

preview_player
Показать описание
Accessing user information from our database with password-checking and the Select query.

Support Board to Bits on Patreon:
Рекомендации по теме
Комментарии
Автор

This series is really excellent, just what I was looking for and better than everything else on yt, cheers.

JohnSmith-vghb
Автор

For Anyone who has the issue of Error 6 Incorrect Password Even though it is correct try changing
$salt = existinginfo["salt"];
$hash = existinginfo["hash"];
Inside of login.php to
$salt = trim($existinginfo["salt"]);
$hash = trim($existinginfo["hash"]);
Credit to @Commentary.

maxtrollinger
Автор

I have succesfully transfered the mySQLtable over to a domain and started a web server as well, able to update etc. while playing the game on the editor. But as soon as I deploy a build onto an android device, it doesn't seem to want to connect/login. Any idea why?

jeffyoung
Автор

Hi, I have a little problem when I trie to login, this alert appears in the console when I write any name and password:
IndexOutOfRangeException: Array index is out of range.
() (at Assets/Loggin.cs:25)

mauriciochaparro
Автор

I am getting username query failed on everything now. can you explain how to fix this please

ravens_shadow
Автор

Hello, can anyone please help with this? I get an error when I try to login after entering the username and password, the error is IndexOutOfRangeException: Index was outside the bounds of the array.
() (at Assets/Login.cs:25)

when I click on the error, it takes me to the Login C# script in visual studio to this line of code if (www.text[0] == '0')
any help would be appreciated.

Auho
Автор

I am receiving the following error:

IndexOutOfRangeException: Index was outside the bounds of the array.
() (at Assets/Scripts/Login.cs:25)
enumerator, System.IntPtr returnValueAddress) (at

I double check everything and seens to be fine :(

patriketessarollo
Автор

Great, Thank you from teacher, Thailand.

นายนรินทร์อนงค์ชัย
Автор

Hi, I have a problem in the unity console:
IndexOutOfRangeException: Array index is out of range.
I checked my script (5 times or more) and the others too but I can not find the issue.
In MAMP I found some errors in the server:
Warning in .\libraries\sql.lib.php#615
count(): Parameter must be an array or an object that implements Countable
What can I do? Thanks.

robertoperez
Автор

This tutorial is exactly what I needed, thank you! Very well explained, you are the best! :)

norionon
Автор

Hi love the series, just got 1 question, does it work in mobile when you build it?

ablank
Автор

I can get everything up to the part where I login. No matter if the information is correct or wrong I still load my scene. Would you know how to fix this by any chance?. Also I really loved how your video is clear, not too loud or soft to hear you when explaining everything.

yesorno
Автор

Hi @Board To Bits Games
. Do you think we can hope to see what is going on in this chapter? Some users including me are having some problems. Thanks. Really Appreciated

patriketessarollo
Автор

I can get everything up to the part where I login. No matter if the information is correct or wrong I still load my scene. Would you know how to fix this by any chance?. Also I really loved how your video is clear, not too loud or soft to hear you when explaining everything. Can't wait to finish, thank you so much for doing these videos

mennis
Автор

Im having an "incorrect password" error altough the password is well written, any help?

AdXxRi
Автор

18:19 when I do this with multiple echos (IDK how to get it to come in one string, I have int and string variables) I get the info coming through, but at the each one, I get an additional 0

IDK where it is from, but I need to remove it. The last index doesn't have one though.

EDIT: I have tried seperate echo for each variable i.e.:

echo "0\t" .$existinginfo["email"];
echo "0\t" .$existinginfo["username"];

but the result pulls the email address with an additional 0 on the end. This happens for each echo. No sure how to get rid of the additional 0.

The last echo doesn't have it so I figure it's got to do with the split or something

moosesnWoop
Автор

Hello Guys i need help, this codes are obsolete, Kindly share how i can convert it to using unitywebrequest instead of www

rancleaveltd
Автор

Say, if anyone is reading this after a year and can answer this for me:

Is all this tutorial doing is using PHP has a bridge between Unity and the server? If so, could I manually populate the server, use PHP to query SQL commands and store the data in variables, then pull those variables into Unity using WebRequests (new version of WWW)? And if true to that, does this continue working if the game is exported to WebGL?

Shadowsphere
Автор

when i press the login button, even though the password is correct it says it is invalid and that i have undefined index hash and salt, i followed you tutorial from the beginning step by step, how can i solve this error ?

vladg
Автор

When I login, it gives me error " incorrect password".
I did exactly like the tutorial.
Can someone help me

danieltavares
visit shbcf.ru