coolphpdude Posted June 18, 2008 Share Posted June 18, 2008 Hey there, I think this is a nice easy one for any experienced people out there. My site allows a student to register as a user. Have a problem with users putting a space after choosing their username, for example a new user registers and chooses 'new' as the username but they put a space after it so it actually appears as 'new '. how do i format the username they choose so that any whitespace AFTER the username, is removed?? Cheers Quote Link to comment https://forums.phpfreaks.com/topic/110725-an-easy-one/ Share on other sites More sharing options...
webbiedave Posted June 18, 2008 Share Posted June 18, 2008 Here ya go: http://us.php.net/manual/en/function.trim.php Quote Link to comment https://forums.phpfreaks.com/topic/110725-an-easy-one/#findComment-568065 Share on other sites More sharing options...
coolphpdude Posted June 18, 2008 Author Share Posted June 18, 2008 thanks, i'll go through this tomorrow. Sounds exactly what i need though so cheers for that! Quote Link to comment https://forums.phpfreaks.com/topic/110725-an-easy-one/#findComment-568200 Share on other sites More sharing options...
coolphpdude Posted June 19, 2008 Author Share Posted June 19, 2008 Sorted cheers!! Quote Link to comment https://forums.phpfreaks.com/topic/110725-an-easy-one/#findComment-568960 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.