$sql = "select count(*) as count_row from member where level = 'M' and group = '$group' ";
$result = mysql_query($sql) or exit($sql);
$row = mysql_fetch_array($result);
if ($row['count_row'] >0){
exit("<script>alert('Please change');history.back();</script>");
}else{
echo "Yes Insert Data";
}