[GameMode] [MySQL R41-4] Login / Register Base Script
#21

Quote:
Originally Posted by ZigGamerx
View Post
Are you going to Complete it by adding more savings like Admin level And VIP or not?
Learn to script and then learn how to use MySQL. Both of them are two different things.

--

+4 reps though.
Reply
#22

Quote:
Originally Posted by ZigGamerx
View Post
Are you going to Complete it by adding more savings like Admin level And VIP or not?
Will see if I get free time, even if I add admin and VIP you'll have to finish them yourself since this is just a login / register system.

Quote:
Originally Posted by Logic_
View Post
Learn to script and then learn how to use MySQL. Both of them are two different things.

--

+4 reps though.
Thank you!
Reply
#23

PHP Code:
    mysql_format(Databasequerysizeof(query), "INSERT INTO `users` (`Username`, `Password`, `IP`, `Cash`, `Kills`, `Deaths`) VALUES ('%e', '%e', '%e', 0, 0, 0)"PlayerName[playerid], PlayerInfo[playerid][Password], PlayerIP[playerid]);
    
// Insert player's information into the MySQL database so we can load it later.
    
mysql_tquery(Databasequery"RegisterPlayer""i"playerid); // We'll call this as soon as the player successfully registers. 
You should use pquery instead of tquery. Good job anyway it's the most updated mysql reg system out there
Reply
#24

For the love of good look up what an ERD is and use it to establish a far better database design. If you're creating an RDB with one table, you're doing it wrong.
Reply
#25

Quote:
Originally Posted by severance
View Post
PHP Code:
    mysql_format(Databasequerysizeof(query), "INSERT INTO `users` (`Username`, `Password`, `IP`, `Cash`, `Kills`, `Deaths`) VALUES ('%e', '%e', '%e', 0, 0, 0)"PlayerName[playerid], PlayerInfo[playerid][Password], PlayerIP[playerid]);
    
// Insert player's information into the MySQL database so we can load it later.
    
mysql_tquery(Databasequery"RegisterPlayer""i"playerid); // We'll call this as soon as the player successfully registers. 
You should use pquery instead of tquery. Good job anyway it's the most updated mysql reg system out there
Updated, thanks.
Reply
#26

Good job.
Shame for the passwords though.
Reply
#27

Quote:
Originally Posted by v1k1nG
View Post
Good job.
Shame for the passwords though.
Why lol?
Reply
#28

pquery - processed query
tquery - threaded query

i assume ?

or its sencless?
Reply
#29

Quote:
Originally Posted by Mobtiesgangsa
View Post
pquery - processed query
tquery - threaded query

i assume ?

or its sencless?
Both are threaded queries.

tquery puts the query into a queue (all queries you put in this queue will be executed in order, in one thread - very important to know actually).
pquery creates a seperate thread for each query, so they will be executed simultanously. Whichever query is faster will return the result first. Meaning they will not be ordered.
Reply
#30

You didnt created "Create Table if not exists" code?
Reply
#31

Quote:
Originally Posted by ZigGamerx
View Post
You didnt created "Create Table if not exists" code?
No - it's best you do that manually, I've uploaded the SQL file in the git repo.
Reply
#32

Should I update this to BCrypt or let it be as it is?
Reply
#33

let it be as it is
Reply
#34

Quote:
Originally Posted by willbedie
View Post
Should I update this to BCrypt or let it be as it is?
I'd update it with BCrypt, especially since it's not much to do anyway.
Reply
#35

Quote:
Originally Posted by NaS
View Post
I'd update it with BCrypt, especially since it's not much to do anyway.
Will update it later or tomorrow.
Reply
#36

Quote:
Originally Posted by willbedie
View Post
Will update it later or tomorrow.
The code is good, you could update it and add more thing like admin levels, VIP's, see if the player is logged in and etc, but so the code looks great, congratulations, I'm not fluent in English, sorry!
Reply
#37

Quote:
Originally Posted by zF3lKy3
View Post
The code is good, you could update it and add more thing like admin levels, VIP's, see if the player is logged in and etc, but so the code looks great, congratulations, I'm not fluent in English, sorry!
Thanks and the only thing that's going to get updated is by updating it to BCrypt from Whirlpool, I won't add admin, neither VIP. Neither a check if the player is logged, you may ask why?

Because I don't have a lot of free time, and this is just a login / register base script (as you can see in the title) so I don't want to complicate it much with other useless stuff, thanks once again.
Reply
#38

every thing work fine and connect to sql but
for me it doesn't register anything

also when i input 1 character in register dialog it doesn't return and show register dialog again
Reply
#39

Quote:
Originally Posted by user5487
View Post
every thing work fine and connect to sql but
for me it doesn't register anything

also when i input 1 character in register dialog it doesn't return and show register dialog again
Show mysql_log
Reply
#40

From .sql dump file:

Quote:

-- PHP Version: 5.6.31

I don't know if you're using a VPS, but if you do, i suggest you to update your PHP version.

Quote:

-- Versione PHP: 7.2.9

On My VPS currently.

Just an advice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)