This is in a handler for a form, which posts user info.
// Check for a username.
if (eregi ("^[[:alnum:]_]{4,50}$", stripslashes(trim($_POST['user_name'])))) {
$u = escape_data($_POST['user_name']);
} else {
$u = FALSE;
echo '<p>Please enter a valid character name!</p>';
}
What I need is for it to allow spaces but I need it to check for an entry.. not real sure what to change without screwing up the entire entry, lol.
Pointers in the right direction is much appreciated.