$contactId = 1234; $url = CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $contactId); echo "View Contact";
$eventId = 5678; $contactId = 1234; $url = CRM_Utils_System::url('civicrm/event/register', "reset=1&id=$eventId&cid=$contactId"); echo "Register for Event";This code would create a URL that includes both the event ID and contact ID, allowing the user to register for the event directly from the link. Overall, the crmURL class in the CRM_Utils_System package library is a beneficial tool for streamlining the development of CRM software.