$username1 = stripinput(trim(eregi_replace(" +", "", $_POST['username']))); $username = str_replace(" ","",$username1);