[insert_php]
global $wpdb;
$msg = “”;
if(isset($_GET[‘id’]))
{
$results = $wpdb->get_results( ‘SELECT * FROM wp_members Where ID=”‘.DBVarConv($_GET[‘id’]).'”‘);
if(empty($results))
{
$msg = “No Member Details Found!!”;
}
else
{
$qry = “update wp_members SET status=’Rejected’, updated='”.date(“Y-m-d”).”‘ Where ID='”.DBVarConv($_GET[‘id’]).”‘”;
$member_reg = $wpdb->query( $qry );
$msg = “Member has been Rejected!!”;
wp_mail( $results[0]->email, “CGIF Member Registration Rejected”, “We are sorry to inform that your CGIF membership has been rejected.\nYou may contact us regarding the same\n\nRegards,\nCGIF Team”);
//print_r($results);
}
}
else
{
$msg = “No Member Details Found!!”;
}
function DBVarConv($var)
{
return addslashes(html_entity_decode($var,ENT_COMPAT,’UTF-8’));
}
[/insert_php]