Click to See Complete Forum and Search --> : Get only user input


aj_nsc
03-28-2007, 06:49 AM
I've been playing with this for hours, maybe someone on here can help me.

I am making a self-validating form in which I have a title field (input type="text") and an RTE (tinyMCE). I am trying to determine if there is any content entered by the user in tinyMCE and I am trying to account for all possibilities, for example, if the user justs tabs over in the RTE, then tinyMCE generates three  .....which I do not want to count as content because it's not, they're just spaces. I've tried this:


$post = strip_tags($_POST['message']);
$post = str_replace(' ','',$post);
$post = implode('',explode(' ',$post));


But if the content entered is

    


Then there still comes out to be 4 characters entered so $post is still not equal to "", which is what I would use for validating. empty() doesn't work either. Can anyone help me out?

aj_nsc
03-28-2007, 06:53 AM
sometimes i'm pretty dumb....I just used trim()....it works.