$em); echo json_encode($arr); exit(); } $sql="UPDATE `groups` SET `groups`.`group` = ".GetSQLValueString($thegroup, 'text').", `groups`.`description` = ".GetSQLValueString($desc,'text')." WHERE gid = ".$_SESSION["group_gid"]; $query=mysql_query($sql) or $em=$em.mysql_error(); $arr = array ('error'=>$em); echo json_encode($arr); exit(); ?>