title: Making textbox color red when error occurs in a form
body: <p>I need your help.. I'm trying to make the textbox red whenever there's an error in a form...</p>
  
  <p>This is what i've being able to do. But when i submit the fore, I get an Undefined Index <strong>error_css</strong> in the form</p>
  
  <pre><code> if (isset($_POST['submit'])) { 
   if (empty($_POST['username'])) {
         $error_css='background-color:red';
   }
  </code></pre>
  
  <p><strong>Form</strong></p>
  
  <pre><code>&lt;label for="username"&gt;Username:&lt;/label&gt;
  &lt;input id="username" type="text" value="&lt;?php if(isset($_POST['username'])){ echo $_POST['username']; } ?&gt;" name="username" title='Username' /&gt;
  </code></pre>
  
  <p>thanks for your time...</p>