title: PHP Radio Buttons - Keep The Values in The Form after an Error
body: <p>I'm building a contact page with email, name, etc. in HTML with PHP. I have radio buttons on my contact page as well. If the user submitted their name and checked a radio button but forgot to put an email in, the form processing page will flipped them back to the contact page with an error. I'm able to have my contact keep the values put in for their name (and email if user inputs it), but it does not keep the value checked in the radio button. </p>
  
  <p>I'm new to PHP, so I bet it's a silly error on my part. Here's what I have for my Name Input:</p>
  
  <pre><code>Your Name:
  &lt;input type="text" name="name" &lt;?php
      if (isset($form['name'])) {
          echo 'value="';
          echo htmlentities($form['name']);
          echo '"';
      }
  ?&gt;/&gt;
  </code></pre>
  
  <p>I tried to do something similar to my Radio. Here's what I have for my Radio:</p>
  
  <pre><code>Are you New to our Business?&lt;br&gt;
  &lt;input type="radio" name="customer" value ="yes" &lt;?php
      if (isset($form['customer'])) {
          echo 'value="';
          echo htmlentities($form['customer']);
          echo '"';
      }
  ?&gt;/&gt;
  
  Yes, I am!&lt;br&gt;
  &lt;input type="radio" name="customer" value="no"&lt;?php
      if (isset($form['customer'])) {
          echo 'value="';
          echo htmlentities($form['customer']);
          echo '"';
      }
  ?&gt;/&gt;
  No, I am a returning customer! 
  </code></pre>
  
  <p>I'm storing the values on the user input in an array called $form - that's why I have ($form['name]). I would like to it to continue doing that. Some other responses I have researched simply have an isset without the array part. </p>
  
  <p>Hopefully I've provided enough information... Thanks for your help! </p>