You're still trying to put information into a column with the same name as the user's password, and I'm still sure that's wrong.
I wonder what error message you'd get if you left the '@' out of
if (@mysql_query($query))
{
header("Location: albums.php");
}
and added an else clause
else
{
echo 'The query "'.$query.'" failed, with MySQL returning '.mysql_error();
die;
}
What is the point of these lines?
global $HTTP_POST_VARS,$HTTP_GET_VARS,$HTTP_SESSION_VARS;
global $_SESSION;
if ($HTTP_POST_VARS!="")
$_POST=$HTTP_POST_VARS;
if ($HTTP_GET_VARS!="")
$_GET=$HTTP_GET_VARS;
if ($HTTP_SESSION_VARS!="")
$_SESSION=$HTTP_SESSION_VARS;
For a start, it's meaningless to declare variables as global when they're already in the global scope. Second, why do you override existing superglobals with the values of other globals that would (unless they've been turned off) contain the same information anyway? If it's a PHP version matter, you should wrap this in a function that checks the PHP version ([man]phpversion[/man] will do that); you will only need to do this is the version is older than 4.1. And if you're going to be doing that all the time, you might as well put it in an include file.
Also, why do you check the values of those variables by comparing them to an empty string, instead of using [man]empty[/man] or [man]isset[/man] (as you do in one place further down). The same question could be asked for if($POST), if(!$POST['title']), the two $GET variables, and you never do check to see that $POST['user_id'] or $_POST['password'] exists before using them.