How to check if an input passed in $_POST is not empty?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9154719/check-whether-post-value-is-empty">Check whether $_POST-value is empty</a>  </p>
</blockquote>



<p>I am using this code to validate if the passed input is not empty, but this fails when I use "white space" in the input. It does pass the empty() check.</p>

<pre><code>if (empty($_POST['r_user'])) {
    $data['error'] = 'Please pick a username to continue.';
    $data['errorID'] = 'r_user';
}
</code></pre>

<p>What is the proper method to check an empty string in PHP?</p>
