vinpkl Posted August 1, 2009 Share Posted August 1, 2009 hi all some of the customers have saved their password in the notepad file. when they copy it, sometimes extra blank spaces get copied in the begining or end of the password with which password becomes incorrect. so i m trying to accept the password without the extra spaces in beginging and end of the password entered. i tried $password=trim(base64_encode($_REQUEST['password'])); but still its accepting the blank spaces and showing mesage password is incorect. if i enter password manually then it works fine. vineet Quote Link to comment https://forums.phpfreaks.com/topic/168401-solved-removing-extra-spacing-from-password/ Share on other sites More sharing options...
.josh Posted August 1, 2009 Share Posted August 1, 2009 edit: What I meant to say was, trim it before the base64_encode trim Quote Link to comment https://forums.phpfreaks.com/topic/168401-solved-removing-extra-spacing-from-password/#findComment-888296 Share on other sites More sharing options...
vinpkl Posted August 1, 2009 Author Share Posted August 1, 2009 hi crayon thanks. it works great now vineet edit: What I meant to say was, trim it before the base64_encode trim Quote Link to comment https://forums.phpfreaks.com/topic/168401-solved-removing-extra-spacing-from-password/#findComment-888300 Share on other sites More sharing options...
vinpkl Posted August 1, 2009 Author Share Posted August 1, 2009 hi does trim() function works with email id i m using it to remove extra blank space from start and end of email id $customer_email=trim($_REQUEST['customer_email']); but its not working vineet Quote Link to comment https://forums.phpfreaks.com/topic/168401-solved-removing-extra-spacing-from-password/#findComment-888355 Share on other sites More sharing options...
.josh Posted August 1, 2009 Share Posted August 1, 2009 trim does what it does, regardless of the string you feed it. If something is "not working" then there's something else going on. Maybe you are doing a case-sensitive string comparison and you aren't entering it in right or something. Who knows? Quote Link to comment https://forums.phpfreaks.com/topic/168401-solved-removing-extra-spacing-from-password/#findComment-888359 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.