14.01.2018, 18:20
Note that cache_num_rows() returns the amount of rows. Which means it will be 0 aka false when there is no account yet. Your if blocks should be turned around:
Код:
if(cache_num_rows()) { // My Login Code } else { // My Register Code }