connect(); $db->query("SELECT attachment_type from ".RES_ATTACHMENTS_TABLE." where res_id = ".$_REQUEST['res_id']); $type = $db->fetch_object()->attachment_type; if ($type == 'signed_response'){ echo "{status:1}"; } else echo "{status:0}"; ?>