$license = new License(new NamedArguments(array('primaryKey' => $_POST['licenseID'])));
                $response = "License Updated Successfully.";
            } else {
                //add data
                $license = new License();
                $license->licenseID = '';
                $license->createDate = date('Y-m-d H:i:s');
                $license->statusID = '';
                $license->statusDate = '';
                $response = "License Added Successfully.<br />Please continue to upload documents and add expressions or emails.";
            }
            $license->shortName = $_POST['shortName'];
            $license->consortiumID = $_POST['consortiumID'];
            //this method will save to either organization or provider depending on the settings
            //also, if this organization or provider doesn't exist it will create a new org/provider
            $license->setOrganization($_POST['organizationID'], $_POST['organizationName']);
            //this is the html that will be displayed in the form after submitting.
            //this is the only form in which this is done.
            try {
                $license->save();
                if (isset($_POST['licenseID']) && $_POST['licenseID'] != '') {
                    $licenseID = $_POST['licenseID'];
                } else {
                    $licenseID = $license->primaryKey;
                }
                ?>
				<table class="thickboxTable" style="background-image:url('images/title.gif');background-repeat:no-repeat;width:260px;">
				<tr>
				<td colspan='2'><br /><span class='headerText'><?php 
                echo $response;
                ?>