Bulk Edit Codes from Form

I am trying to replace about 30 codes used in a field in one of my forms. I would prefer to bulk import or replace rather than copying and pasting 30 times.

When I go to functions.php I find relevant code:

function check_student_code_for_evaluation_form() {
  global $wpdb;
  $sql = "SELECT * FROM evaluation_forms_student_codes WHERE studentcode = '" . $_POST['studentcode'] . "'";
  $rows = $wpdb->get_results($sql);

  if(empty($rows)) {
    echo "invalid";

  foreach ($rows as $row_data) {
    if ($row_data->used) {
      echo "used";
    else {
      echo "valid";

add_action('wp_ajax_nopriv_ldr_check_student_code_for_evaluation_form', 'check_student_code_for_evaluation_form'); // for not logged in users
add_action('wp_ajax_ldr_check_student_code_for_evaluation_form', 'check_student_code_for_evaluation_form');

I then went over to phpmyadmin and while I see a table with the name from this code, I don’t see any entries to edit. I’m assuming these codes reside in a table somewhere on my site?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.