prefix.'Appointments';
$userid=$_REQUEST['userid'];
$username = $wpdb->get_var("SELECT user_login FROM {$wpdb->users} WHERE ID = '{$userid}'");
get_currentuserinfo();
$user=$current_user->user_login;
$admin_email = get_option('email_address');
$lastId = $wpdb->get_var("SELECT max(appointment_id) FROM $table"); // Get last inserted id
$res=$wpdb->get_results("SELECT * from $table WHERE appointment_id='".$lastId."'");
foreach($res as $val){
$a=$val->email_id;
$dat=$val->date_of_apointment;
}
$path = $this->options['upload_image'];
$img = "";
$subtitle="Hi {$username},";
$subjectPara1 = 'Appointment successfully approved by admin!';
$subjectPara2 = 'Please click here to show approved Appointment.';
$subjectPara3 = 'Thank you';
$message = ''.
'
'.$subtitle.'
'. ''.$subjectPara1.'
'. ''.$subjectPara2.'
'. ''.$subjectPara3.'
'. '