MyBB Community Forums

Full Version: [Help] Ajax / Cool Registeration Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hell mates,
I've been hard-moddig my MyBB and I've been accross "Ajax / Cool Regiseration", I've done all the instructions but yet, it gives me 3 errors whenever it tries to check for the username if it's correct or not, and the errors are:
Quote:Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/H4x0rX/public_html/forums/inc/plugins/ajax_cr.php on line 34

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/H4x0rX/public_html/forums/inc/plugins/ajax_cr.php on line 34

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/H4x0rX/public_html/forums/inc/plugins/ajax_cr.php on line 35
So, what could be causing this and how to [possible] fix it?
Thanks in advance. Smile

- H4x0rX
Your problem is your using the mysql functions. Get acquainted with the MyBB Database Abstraction layers and how they work. Search around and look in the MyBB code for examples.
Please give me direct links, Thanks. Smile
BUMP
Anyone please help. Sad

¬Gjs1992
First of all, don't bump threads after 24 hours. And second, you can't do a search?
No.
Because I don't know what to search for, so please help me!

- H4x0rX
Bump. Bump. Bump. Sad
Anyone help...?

~Gjs1992
Tikitiki Wrote:Your problem is your using the mysql functions. Get acquainted with the MyBB Database Abstraction layers and how they work. Search around and look in the MyBB code for examples.

Tikitiki has already given you the answer you were looking for. You are looking for MyBB code for examples.
Meh.
I'm not a PHP nor a MySQL Coder, due to that I need direct help in modifying the code of the plugin. 8-)
QEDIT: The two lines that the code produces error with are:
$query = mysql_query("SELECT username FROM mybb_users WHERE username = '" . $_GET['user'] . "'");
$count = mysql_num_rows($query);


~Gjs1992
I think it's where there's the $_GET['user']...Usually, $_GET[''] is used in a link: ex: index.php?user=name..Then, if you were to:
<?php
echo 'Welcome, '.$_GET['user'].'!';
?>
Wich would output: Welcome, name!...I might be wrong, though