To be honest, this is riddled with errors, does it even run?
$query = mysql_query("INSERT INTO users (firstname, surname, email, password, date_registered) VALUES ('" . $firstname . "', '" . $surname . "', '" . mysql_real_escape_string($registerEmail) . "', MD5('" . mysql_real_escape_string($registerPassword) . "'), GETDATE())");
$success['register'] = 'Thank you for registering. You can now log in on the left.';
$errors['register'] = 'There was a problem registering you. Please check your details and try again.';
To be honest, you really need to learn SQL Syntax, getting @[r937 ;'s [URL="http://www.sitepoint.com/books/sql1/"]book](http://www.sitepoint.com/forums/member.php?u=19900) would be a good start.