I also see that you have a mash of quotes. Try to use ' everywhere in PHP and use " inside of php strings for SQL
Example:
queryDB('REPLACE INTO %sconfig VALUES ("contact_email", "%s")', array($_POST['step1']['tb_prefix'], urldecode($_POST['step1']['contact_email'])));