<?php $resourceID = $_GET['resourceID']; if (isset($_GET['attachmentID'])) { $attachmentID = $_GET['attachmentID']; } else { $attachmentID = ''; } $attachment = new Attachment(new NamedArguments(array('primaryKey' => $attachmentID))); //get all attachment types for output in drop down $attachmentTypeArray = array(); $attachmentTypeObj = new AttachmentType(); $attachmentTypeArray = $attachmentTypeObj->allAsArray(); ?> <div id='div_attachmentForm'> <form id='attachmentForm'> <input type='hidden' name='editResourceID' id='editResourceID' value='<?php echo $resourceID; ?> '> <input type='hidden' name='editAttachmentID' id='editAttachmentID' value='<?php echo $attachmentID; ?> '> <div class='formTitle' style='width:345px;'><span class='headerText' style='margin-left:7px;'><?php if ($attachmentID) { echo "Edit Attachment"; } else { echo "Add Attachment"; }