title: Add/change text in div based on php if statement
body: <p>I have a page to create a new user. I have a php script that does various checks on the data entered in text fields. When it finds non-conforming entries, I need to provide feedback to the user to state why the process has been terminated. My thought was to simply have an empty div that I would populate with a message specific to the failing condition. </p>
  
  <p>However, it looks like this might be more difficult than I had thought. I'd prefer to to this in my php script. I'm pretty new to web development. I'm open to suggestions about the best / easiest way to accomplish this. Thanks.</p>
  
  <pre><code>&lt;div id="page"&gt;
      &lt;img id="mainpic" src="images/banner.png" height="390" width="982"&gt;
  
      &lt;div id="stylized" class="leftsidebox"&gt;&lt;/div&gt;
  
       &lt;div id="stylized" class="myform"&gt;
          &lt;form id="form" name="form" method="post" action="scripts/create_admin.php"&gt;
  
              &lt;label&gt;Security Code
                  &lt;span class="small"&gt;Enter the security code provided to you&lt;/span&gt;
              &lt;/label&gt;
              &lt;input type="text" name="securitycode" id="name" /&gt;
  
              &lt;button type="submit"&gt;Create Administrator&lt;/button&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  
      &lt;div id="stylized" class="rightsidebox"&gt;
          &lt;div id="stylized" class="feedback"&gt;
              &lt;h1&gt;this is where I want to add dynamic text from php&lt;/h1&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;?php
  
      include('connection.php');
  
      //retrieve input values from the form
      $security_code = $_REQUEST['securitycode'];
  
      if (strlen($security_code) == 0) {
          //Add the text "Please enter a security code." to the div class="feedback"
          die();
      }
  ?&gt;
  </code></pre>