function remove_comments_left($comment_author_email) {
global $wpdb;
global $default_comments_allowed;
$table_name = $wpdb->prefix . "gatornet";
$wpdb->query("INSERT INTO ".$table_name." (email, comments_left) VALUES ('".$comment_author_email."', '".$default_comments_allowed."' )");
}
add_action('comment_post', 'remove_comments_left');
Above is the code I am using to try to submit the email of anyone who submits a comment into a database table. However, the odd thing that happens is that instead of putting in the authors email address it is putting “2010”, “2011”, “2012”, and so on into table where the email address should go. I’m not trying to pull a date of any kind as you can see based on the function above. Any ideas what i’m doing wrong or how I can accomplish what I am attempting to do?
Thanks!