title: php echo statement div class
body: <pre><code>&lt;?php $lname = $_POST['lname'];
     if ( isset($_POST['lname'] )&amp;&amp; !empty( $_POST['lname'] ) ) {
        echo '&lt;div class="result"My blank is under&lt;/div&gt; &lt;div class="green"&gt; $lname &lt;/div&gt; ';
     } else {
        echo '&lt;div class="result"&gt;Please tell them your&lt;/div&gt; &lt;div class="green"&gt;last name!&lt;/div&gt; ';
     }
  ?&gt;
  </code></pre>
  
  <p>The syntax should be correct however when i enter the data into my form the echo statement displays the variable name $lname in the green class not the data entered. </p>
  
  <p>Did i forget quotes somewhere or to escape somewhere?</p>
  
  <pre><code>&lt;style&gt;
      .result {
          color: #FFF;
          display: block;
          font-size: 36px;
          margin-top: 1px;
          margin-before: 5px;
          margin-bottom: 0px;
          margin-start: 0; 
          margin-end: 0;
          text-align:center;
          font-weight: bold; }
      .green {
          color: #C9FF1F;
          display: block;
          font-size: 40px;
          margin-top: 1px;
          margin-before: 5px;
          margin-bottom: 0px;
          margin-start: 0;
          margin-end: 0;
          text-align: center;
          font-weight: bold;
      }
  &lt;/style&gt;
  </code></pre>