I am getting this error "could not execute query." I have double and triple checked my connect file.. it is right.
If anyone could tell me where my mistake is I would greatly appreciate it. Thanks in advance.
if(isset($_POST['submit'])){// handle the form
// Connect to the database.
require_once ('incl/mysql_connect.php');
// The insert condition.
$query = "INSERT INTO join (screen_name, email, char_name, char_age, char_sex, char_race, prime_class, strength, dexterity, speed, intelligence, vitality, health, player_name, player_age, player_sex, second_email, recruited, date) VALUES ('$screen_name', '$email', '$char_name', '$char_age', '$char_sex', '$char_race', '$prime_class', '$strength', '$dexterity', '$speed', '$intelligence', '$vitality', '$health', '$player_name', '$player_age', '$player_sex', '$second_email', '$recruited', NOW() )";
$result = @mysql_query ($query)or die ("could not execute query."); // Run the query.
if ($result) { // If it ran OK.
// Send an email, if desired.
echo '<p>Thank you for adding this registration!</p>';
exit();
} else { // If it did not run OK.
// Send a message to the error log, if desired.
echo '<p>Your information could not be registered due to a system error. We apologize for any inconvenience.</p>';
}
mysql_close(); // Close the database connection.
} // End of the main Submit conditional.