Possible Duplicate:
Check whether $_POST-value is empty
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.
if (empty($_POST['r_user'])) {
$data['error'] = 'Please pick a username to continue.';
$data['errorID'] = 'r_user';
}
What is the proper method to check an empty string in PHP?