am kind of new to wordpress coding, am trying to edit the wp-login.php file, in which if a user clicks register button, it registers the user and stores an information on a different table in the database.. my code to insert new data into the database is below, how do i add it inside wordpress?

global $wpdb;
$wpdb->insert('wp_classes',
array( 'userlogin' => $user_id, 'classselect' => $_POST['class_select'])
);
$wpdb->show_errors();
$wpdb->print_error();

Read more here: perform a function when a user clicks register button in wordpress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , ,

Wordpress related questions and answers: