Originally Posted by MRMAN
simplest way would be this
$username = str_replace(" ", "",$_POST['nickname'])
I actually can't strip out the gaps, as its going to be the users name and password. If i strip it out, then their log in will be different. (for example: the user inputs 'player 1', and the application saves it as 'player1')
I have put a notice on the form asking users not to add spaces but they are not reading it. So I need to check it and issue a warning if there is a space.