title: Disable and enable textbox for edit and save information
body: <p>I have this form i try when i click the button edit the input field will be enable and i can edit the information on it </p>
  
  <p>And when i click the save button the input field will be saved on mysql database and the text field will be disabled</p>
  
  <p>i try with this code below but it didn't work </p>
  
  <p>any suggestion please?</p>
  
  <pre><code>&lt;form name='' id='' action='' method='post'&gt;
  &lt;input type='text' name='txt_category' id='category' value='$category' disabled&gt;
  &lt;input type='text' name='txt_stage' id='stage' value='$stage' disabled&gt;
  &lt;input type='checkbox' name='txt_approve' id='approve' value='$approve' disabled&gt;
  &lt;input type='submit' name='edit' value='edit' onclick='myFunction()'&gt;
  &lt;input type='submit' name='save' value='save' onclick='mysaveFunction()'&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>/***********************************/</p>
  
  <pre><code>&lt;script&gt;
  function myFunction() {   
  document.getElementById('category').readOnly = true;
  document.getElementById('stage').readOnly = true;
  document.getElementById('approve').readOnly = true;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>/**********************************/</p>
  
  <pre><code> &lt;script&gt;
      function mysaveFunction() {   
      document.getElementById('category').disabled = true;
      document.getElementById('stage').disabled = true;
      document.getElementById('approve').disabled = true;
      }
      &lt;/script&gt;
  </code></pre>