Topic: "You have an error in your SQL syntax" error when attempting to login

Full error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Similar to this guy's problem: http://punbb.org/forums/viewtopic.php?id=9226

Could this be related to the MySQL version? Or magic quotes being on/off?

Any ideas?

Re: "You have an error in your SQL syntax" error when attempting to login

Seems like, in some way, an empty username or password got parched through wink

Re: "You have an error in your SQL syntax" error when attempting to login

After looking through the code the failure is happening on calls to the message funtion:

Like this one for logging in:
message($lang_login['Wrong user/pass'].' <a href="login.php?action=forget">'.$lang_login['Forgotten pass'].'</a>');

Or this one for forgotten password:
message($lang_login['Forget mail'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');

Re: "You have an error in your SQL syntax" error when attempting to login

So instead of calling message() it just keeps executing?

Try reuploading include/functions.php

Re: "You have an error in your SQL syntax" error when attempting to login

No, I discovered that it stops excuting where message() is and gives that mySQL error, which doesn't make any sense.