query($wpdb->prepare($sql)); } else if ( $_REQUEST['attendee_action'] == 'update_attendee' ){ $id = $_REQUEST['id']; $regisration_id=$row['id']; $fname = $_POST['fname']; $lname = $_POST['lname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $country = $_POST['country']; $phone = $_POST['phone']; $email = $_POST['email']; $hear = $_POST['hear']; $event_id=$_POST['event_id']; $payment = $_POST['payment']; $custom_1 =$_POST['custom_1']; $custom_2 =$_POST['custom_2']; $custom_3 =$_POST['custom_3']; $custom_4 =$_POST['custom_4']; $sql="UPDATE ". $events_attendee_tbl . " SET fname='$fname', lname='$lname', address='$address', city='$city', state='$state', zip='$zip', country='$country', phone='$phone', email='$email', payment='$payment', hear='$hear', custom_1='$custom_1', custom_2='$custom_2', custom_3='$custom_3', custom_4='$custom_4' WHERE id ='$id'"; $wpdb->query($wpdb->prepare($sql)); // Insert Extra From Post Here $events_question_tbl = get_option('events_question_tbl'); $events_answer_tbl = get_option('events_answer_tbl'); $reg_id = $id; $wpdb->query($wpdb->prepare("DELETE FROM $events_answer_tbl where registration_id = '$reg_id'")); $questions = $wpdb->get_results("SELECT * from `$events_question_tbl` where event_id = '$event_id'"); if ($questions) { foreach ($questions as $question) { switch ($question->question_type) { case "TEXT": case "TEXTAREA": case "SINGLE": $post_val = $_POST[$question->question_type . '-' . $question->id]; $wpdb->query($wpdb->prepare("INSERT into $events_answer_tbl (registration_id, question_id, answer) values ('$reg_id', '$question->id', '$post_val')")); break; case "MULTIPLE": $values = explode(",", $question->response); $value_string = ''; foreach ($values as $key => $value) { $post_val = $_POST[$question->question_type . '-' . $question->id . '-' . $key]; if ($key > 0 && !empty($post_val)){ $value_string .= ','; $value_string .= $post_val; } } $wpdb->query($wpdb->prepare("INSERT into $events_answer_tbl (registration_id, question_id, answer) values ('$reg_id', '$question->id', '$value_string')")); break; } } } } $sql = "SELECT * FROM ". $events_detail_tbl . " WHERE id='".$view_event."'"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc ($result)){ $event_id = $row['id']; $event_name = $row['event_name']; $event_desc = $row['event_desc']; $event_description = $row['event_desc']; $event_identifier = $row['event_identifier']; $cost = $row['event_cost']; $active = $row['is_active']; $question1 = $row['question1']; $question2 = $row['question2']; $question3 = $row['question3']; $question4 = $row['question4']; } $id = $_REQUEST['id']; $sql = "SELECT * FROM " . $events_attendee_tbl . " WHERE id ='$id'"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc ($result)){ $id = $row['id']; $regisration_id=$row['id']; $lname = $row['lname']; $fname = $row['fname']; $address = $row['address']; $city = $row['city']; $state = $row['state']; $zip = $row['zip']; $country = $row['country']; $email = $row['email']; $hear = $row['hear']; $payment = $row['payment']; $phone = $row['phone']; $date = $row['date']; $payment_status = $row['payment_status']; $txn_type = $row['txn_type']; $txn_id = $row['txn_id']; $amount_pd = $row['amount_pd']; $quantity = $row['quantity']; $payment_date = $row['payment_date']; $event_id = $row['event_id']; $custom_1 = $row['custom_1']; $custom_2 = $row['custom_2']; $custom_3 = $row['custom_3']; $custom_4 = $row['custom_4']; } ?>

Attendee Management

Attendee details saved for .

Attendee # | Name: | Registered For:

  • First Name:
  • Last Name:
  • Email:
  • Phone:
  • Address:
  • City:
  • State or Province:
  • Zip:
  • country:
  • How is attendee paying for registration?
  • get_results("SELECT * from $events_question_tbl where event_id = '$event_id' order by sequence"); if ($questions){ for ($i = 0; $i < count($questions); $i++) { echo "

    ".$questions[$i]->question."
    "; $question_id = $questions[$i]->id; $query = "SELECT * FROM $events_answer_tbl WHERE registration_id = '$id' AND question_id = '$question_id'"; $result = mysql_query($query) or die('Error : ' . mysql_error()); while ($row = mysql_fetch_assoc ($result)){ $answers = $row['answer']; } event_form_build($questions[$i], $answers); echo "

    "; } } ?> >