title: How do I fix PHP errors, Use of undefined constant and Cannot modify header info?
body: <p>My website has a section where a user who has signed up for access (and has an existing profile) can edit their own profile. When the user clicks to save the profile changes, the following 4 PHP errors come up.  My understanding is that often several errors appear due to the first one so I am hoping that resolving the first one is all it takes. Here I will provide details for number 1 only, rather than pasting so much code.</p>
  <p>A PHP Error was encountered</p>
  <blockquote>
  <p>Message: Use of undefined constant WEBMASTER - assumed 'WEBMASTER'
  Filename: controllers/content.php Line 285</p>
  <p>Message: Cannot modify header info- headers already sent by (output
  started at ////system/core/Exceptions.php:185
  Filename: libraries/Sessions.php
  Line 672</p>
  <p>Message: Cannot modify header info- headers already sent by (output
  started at ////system/core/Exceptions.php:185 Filename:
  helpers/url_helper.php Line 542</p>
  </blockquote>
  <p>Here is the code for 1. Line 285 begins with &quot;$permission&quot;.</p>
  <pre><code>function edit($id=&quot;&quot;,$language=&quot;&quot;){
  
      //which users are allowed to see this file.
      //* for everybody including those who are not registered
      //admin (or any other specific type for )
      $permission=array(ADMIN,WEBMASTER);
      $next_page=site_url(&quot;/content/manage&quot;);
  </code></pre>
  <p>Is there anything obviously wrong here?</p>