title: How to check if a text box is not empty and the value is less than 500
body: <p>I have a textbox that is an optional field for users to enter a number in to.  If there is a number in there, I want to check to make sure it is less than 500 and then do something with it.</p>
  
  <p>Here is what I am currently doing:</p>
  
  <pre><code>if($textbox!="" &amp;&amp; &lt;=500)
  {
  //action here
  }
  </code></pre>
  
  <p>I tried replacing &amp;&amp; with andif but still get an error <strong>Parse error: syntax error, unexpected T_IS_SMALLER_OR_EQUAL</strong></p>
  
  <p>What's the easiest way to do this?</p>