} else {
         // no email or id supplied
         echo "You must supply an email address or LinkedIn ID to send out the invitation to connect.";
     }
     break;
 case 'message':
     // connection messaging
     if (!empty($_POST['connections'])) {
         $OBJ_linkedin = new linkedin();
         $OBJ_linkedin->set_token_access($_SESSION['oauth']['linkedin']['access']);
         if (!empty($_POST['message_copy'])) {
             $copy = TRUE;
         } else {
             $copy = FALSE;
         }
         $response = $OBJ_linkedin->message($_POST['connections'], $_POST['message_subject'], $_POST['message_body'], $copy);
         if ($response === TRUE) {
             // message has been sent
             header('Location: ' . $_SERVER['PHP_SELF']);
         } else {
             // an error occured
             echo "Error sending message:\n\nRESPONSE:\n\n" . print_r($response, TRUE) . "\n\nLINKEDIN OBJ:\n\n" . print_r($OBJ_linkedin, TRUE);
         }
     } else {
         echo "You must select at least one recipient.";
     }
     break;
 case 'nupdate':
     // process a network update action
     $OBJ_linkedin = new linkedin();
     $OBJ_linkedin->set_token_access($_SESSION['oauth']['linkedin']['access']);