        <?php

		require_once( 'dbconnect.php' );

        $group_name = $_POST['group_name'];
        $group_admin = $_POST['group_admin'];
        $group_email = $_POST['group_email'];
        $group_status = $_POST['group_status'];
        $group_notes = $_POST['group_notes'];
        $id = $_POST['element_id'];
        $q = "UPDATE wp_groups SET ";
        if (isset($group_name)) {
            $q .= " group_name = '$group_name'";
        }
        if (isset($group_admin)) {
            $q .= " group_admin = '$group_admin'";
        }
        if (isset($group_email)) {
            $q .= " group_email = '$group_email'";
        }
        if (isset($group_status)) {
            $q .= " group_status = '$group_status'";
        }
        if (isset($group_notes)) {
            $q .= " group_notes = '$group_notes'";
        }
        if (isset($id)) {
            $q .= " WHERE id = $id";
        }

		
        $res = mysql_query($q);

        $result = "";
        if (isset($group_name)) {
            $result .= "$group_name ";
        }
        if (isset($group_admin)) {
            $result .= "$group_admin ";
        }
        if (isset($group_email)) {
            $result .= "$group_email ";
        }
        if (isset($group_status)) {
            $result .= "$group_status ";
        }
        if (isset($group_notes)) {
            $result .= "$group_notes ";
        }
		
		echo $result;
		
				
        $result = "";
        if (isset($group_name)) {
            $result .= "$group_name ";
        }
        if (isset($group_admin)) {
            $result .= "$group_admin ";
        }
        if (isset($group_email)) {
            $result .= "$group_email ";
        }
        if (isset($group_status)) {
            $result .= "$group_status ";
        }
        if (isset($group_notes)) {
            $result .= "$group_notes ";
        }
		
		?>