Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[Lightcms] Register Not Making User?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ItsNick" data-source="post: 258024" data-attributes="member: 39893"><p>[PHP]public function doesUserExist($username) {</p><p> global $db;</p><p> $query = $db->query("SELECT null FROM users WHERE username = '" . $username . "'");</p><p> $rows = $query->num_rows;</p><p> if($rows < 0) {</p><p> return false;</p><p> }</p><p> return true;</p><p> }[/PHP]</p><p>In your Class_users.php...</p><p>This functions says its selecting if a column is null, or doesn't find anything. Try changing it to:</p><p>[PHP] $query = $db->query("SELECT * FROM users WHERE username ='".$username."' LIMIT 1");[/PHP]</p><p></p><p>This way, if it finds something, it will return true if that user is found with the matching username.</p></blockquote><p></p>
[QUOTE="ItsNick, post: 258024, member: 39893"] [PHP]public function doesUserExist($username) { global $db; $query = $db->query("SELECT null FROM users WHERE username = '" . $username . "'"); $rows = $query->num_rows; if($rows < 0) { return false; } return true; }[/PHP] In your Class_users.php... This functions says its selecting if a column is null, or doesn't find anything. Try changing it to: [PHP] $query = $db->query("SELECT * FROM users WHERE username ='".$username."' LIMIT 1");[/PHP] This way, if it finds something, it will return true if that user is found with the matching username. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Lightcms] Register Not Making User?
Top