title: Add the "Return" value to a div
body: <p>I am wondering if it's possible to get the return value in PHP added to the page content, and not just showing as an error.</p>
  
  <p>Currently, when the form is submitted it generates this:</p>
  
  <p><img src="https://i.stack.imgur.com/GAsCL.png" alt="enter image description here"></p>
  
  <p>What I want is that when the form is submitted and the error/success message is to show, the content of the page should be there aswell. Like this:</p>
  
  <p><img src="https://i.stack.imgur.com/ng2vY.png" alt="enter image description here"></p>
  
  <p>This is my code:</p>
  
  <pre><code>if($_POST)
  {
      $newTopic = $forum-&gt;newTopic();
  
  
          /*
           * Return codes:
           * 1: No title
           * 
           * 100: Success
           */
  
      switch($newTopic)
      {
  
              case 1:
                  $error = 'You have not entered any title.';
                  $stop = true;
              break;
  
              //If no error = success.    
              case 100:
                  $success = "Success! TOpic created";
              break;
      }
  
      die($error);
  }
  </code></pre>
  
  <p>How can I obtain this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The HTML for the page is generated like this:</p>
  
  <pre><code>loadmodule('forum');
  $forum= new Forum;
  
  if(file_exists(HEADER)) { include_once(HEADER); }
  if($contents) { print $contents; }  
  if($_POST)
  {
      $newTopic = $forum-&gt;newTopic();
  
  
          /*
           * Return codes:
           * 1: No title
           * 
           * 100: Success
           */
  
      switch($newTopic)
      {
  
              case 1:
                  $error = 'You have not entered any title.';
                  $stop = true;
              break;
  
              //If no error = success.    
              case 100:
                  $success = "Success! TOpic created";
              break;
      }
  
      die($error);
  }
  
  
  if(file_exists(FOOTER)) { include_once(FOOTER); }
  </code></pre>