title: How can I prevent a user using inspect element to enable a disabled element?
body: <p>I have a button as follows:</p>
  
  <pre><code>&lt;input type="submit" class="button" value="FooBar" name="FooBar" id="FooBar" disabled="disabled"&gt;
  </code></pre>
  
  <p>I am enabling this button only when certain parameters are met. To test whether it was secure, I pressed F12 (or right click -> Inspect Element) and edited out the text <em>disabled="disabled"</em>.  Doing this overrides my code and that is scary. How can I prevent someone from changing it in this manner?</p>
  
  <p>I am using php and jquery in this page and using the latter to enable or disable the button.  I have checked the jquery click function and it not only executes, but shows the button as <strong>not</strong> disabled. The alert below reads <em>Disabled: false</em></p>
  
  <pre><code>$("#FooBar").click(function(){
      alert('Disabled: ' + $(this).is('[disabled=disabled]'));    
  })
  </code></pre>
  
  <p>So how can I prevent a user from changing the button disabled state and thus overriding my logic?</p>