Yes, or if you do it just for debugging purpose:
$sql = "INSERT INTO members (id, status, name, ipaddress, salt, gender, country, password, chatpass, email, joined, act) VALUES ('NULL', '".$status."', '".$member[name]."', '".$ip."', '".$enurl."', '".$member[gender]."', '".$member[country]."', '".$pass2."', '".$member[chatpass]."', '".$member[email]."', 'NULL', '".$anumber."')";
$result = mysql_query($sql) or die(mysql_error());
Note that user_error() is probably a userdefined error handling function which you would need to write (that e.g., logs the error to the database for later verification)