The root of this problem is that the coding for the input statement in dtdonate.php does not escape the variables that are likely to contain special characters (most notably, an apostrophe) form the user input. For example, if a user enters \"I\'m stoked\" in the comments field, you will receive the database error. Similarly, if a user enters \"D\'Wayne\" in the first name field, you will also receive the database error.
The fix for this problem is to replace the VALUES section of the INSERT queries found at or around rows 3566 and 5331 with the following:
values(\'\".mysql_real_escape_string($fname).\"\',\'\".mysql_real_escape_string($lname).\"\', \'\".mysql_real_escape_string($org).\"\', \'\".mysql_real_escape_string($address).\"\',\'\".mysql_real_escape_string($city).\"\',\'$state\',\'\".mysql_real_escape_string($country).\"\', \'$zip\',\'$phone\',\'$email\',\'$amount\',\'$paymenttype\',NOW(),\'\".mysql_real_escape_string($comments).\"\', \'authorize.net\',\'$transactionid\',\'\".mysql_real_escape_string($currentUserId).\"\')\";
and
values(\'\".mysql_real_escape_string($fname).\"\',\'\".mysql_real_escape_string($lname).\"\', \'\".mysql_real_escape_string($org).\"\', \'\".mysql_real_escape_string($address).\"\',\'\".mysql_real_escape_string($city).\"\',\'$state\',\'\".mysql_real_escape_string($country).\"\', \'$zip\',\'$phone\',\'$email\',\'$amount\',\'$frequency\',\'$startdate\',\'\".mysql_real_escape_string($comments).\"\', \'authorize.net\',\'$subscriptionId\',\'\".mysql_real_escape_string($currentUserId).\"\')\";
respectively. The development people at DTH need to make this a general coding practice so that it does not happen again.
Hope this helps.