php - Changing text on email notification -


i using rsvp plugin wordpress , have modified can show guests invited event. when go in , rsvp sends email @ moment looks this:

if((get_option(option_notify_on_rsvp) == "y") && (get_option(option_notify_email) != "")) {     $sql = "select firstname, lastname, rsvpstatus ".attendees_table." id= ".$attendeeid;     $attendee = $wpdb->get_results($sql);     if(count($attendee) > 0) {         $body = "hello, \r\n\r\n";          $body .= stripslashes($attendee[0]->firstname)." ".stripslashes($attendee[0]->lastname).                          " has submitted rsvp , has rsvp'd '".$attendee[0]->rsvpstatus."'.";          wp_mail(get_option(option_notify_email), "new rsvp submission", $body);     } } 

in database have field called rsvpevent , want data , show person's rsvp event. have tried adding it:

if((get_option(option_notify_on_rsvp) == "y") && (get_option(option_notify_email) != "")) {     $sql = "select firstname, lastname, rsvpstatus ".attendees_table." id= ".$attendeeid;     $attendee = $wpdb->get_results($sql);     if(count($attendee) > 0) {         $body = "hello, \r\n\r\n";          $body .= stripslashes($attendee[0]->firstname)." ".stripslashes($attendee[0]->lastname).                           "has been invited '".$attendee[0]->rsvpevent."'." "and has submitted rsvp , has rsvp'd '".$attendee[0]->rsvpstatus."'.";          wp_mail(get_option(option_notify_email), "new rsvp submission", $body);     } } 

but crashes entire site, can give me hints or tips going wrong?

you not getting rsvpevent field database.

try adding select query, in:

if((get_option(option_notify_on_rsvp) == "y") && (get_option(option_notify_email) != "")) {     $sql = "select firstname, lastname, rsvpstatus, rsvpevent ".attendees_table." id= ".$attendeeid;     $attendee = $wpdb->get_results($sql);     if(count($attendee) > 0) {         $body = "hello, \r\n\r\n";          $body .= stripslashes($attendee[0]->firstname)." ".stripslashes($attendee[0]->lastname).                           "has been invited '".$attendee[0]->rsvpevent."'." "and has submitted rsvp , has rsvp'd '".$attendee[0]->rsvpstatus."'.";          wp_mail(get_option(option_notify_email), "new rsvp submission", $body);     } } 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -