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');
Sorry, I posted this in the parent forum and didn’t realize until now that it was supposed to be here. I have created a function that I want to execute every time someone submits a comment. I want to add the author email to a specific table. Unfortunately it is pulling in $comment_author_email in the database as “2010”, “2011”, “2012” and with every comment submitted increasing the number. Any idea why or how to accomplish what I am trying to do would be very helpful! Thanks!
The topic ‘comment_author_email – Going to a year?’ is closed to new replies.
(@phpgator)
13 years, 4 months ago
Sorry, I posted this in the parent forum and didn’t realize until now that it was supposed to be here. I have created a function that I want to execute every time someone submits a comment. I want to add the author email to a specific table. Unfortunately it is pulling in $comment_author_email in the database as “2010”, “2011”, “2012” and with every comment submitted increasing the number. Any idea why or how to accomplish what I am trying to do would be very helpful! Thanks!