Posts: 112
Threads: 8
Joined: Jan 2013
Quote:
Originally Posted by COL
there is a bug that i have no idea how i can fix it
the bug i can login with different password to other people account, how i could fix that problem
|
I hope you know that mysql_num_rows( ) returns the number of results and if there is no result it returns zero.
Now look at your if-statement
pawn Код:
if ( mysql_num_rows( ) != 1 )
Yes there is something wrong you have to change the 1 to 0 or you can use == instead of != .
A little trick use LIMIT 1 behinde your sql-command that make your query faster and if you use
the r6 plugin from blueG then you can use even mysql_format and the placeholder %e to escape strings.
Posts: 18
Threads: 8
Joined: Nov 2013
Reputation:
0
i have changed it to 0 and changed != to == and i still can login with different password D: