title: Value vs Placeholder Attributes in HTML
body: <p>I am working on a form, and have fields that may or may not be filled in by the user. To keep the backend logic simple, I plan on taking all the data from the form and updating my records with all of it, regardless of what the user has entered into the fields or not.</p>
  
  <p>I was told (perhaps incorrectly) that I could take the data that currently exists in the database (ie, at the time the page loads) and put it into the input area's 'value' attribute. Supposedly, this would make it that if the user does NOT enter anything into the field, the old/current values will simply be passed back to the server and re-entered (but not changed).</p>
  
  <p>If the user DOES enter data, then THAT would become the new value.</p>
  
  <p>So it would look something like this:</p>
  
  <pre><code>&lt;input type='text' name='XYZ' value='&lt;?php echo $record['XYZ']; ?&gt;'&gt;&lt;/td&gt;
  </code></pre>
  
  <p>-1--So the first question is, is this true?</p>
  
  <p>The second question is that I don't want this value showing up in the actual text field. Therefore, I added a placeholder attribute to the input tag:</p>
  
  <pre><code>&lt;input type='text' name='XYZ' value='&lt;?php echo $record['XYZ']; ?&gt;' placeholder=''&gt;&lt;/td&gt;
  </code></pre>
  
  <p>But the value attribute seems to override the placeholder tag! </p>
  
  <p>-2--So the second Q is, is there anyway to assign the value as I would like and NOT have it appear in the actual textfield?</p>