 <p>It's not clear what you want do do, but if you're using POST to send it to PHP then you can check if the value is empty like this</p> <pre><code>&lt;?php if(empty($_POST['value_name'])) { echo 'value is required'; } else { // OK } </code></pre>