Change PAssword

Thread Solved

Join Date: Aug 2007
Posts: 64
Reputation: nil_gh_80 is an unknown quantity at this point 
Solved Threads: 0
nil_gh_80's Avatar
nil_gh_80 nil_gh_80 is offline Offline
Junior Poster in Training

Change PAssword

 
0
  #1
Dec 1st, 2008
Hello friends,

I'm in a serious problem....... I have a change password application for registered users......I've applied javascript to check wheather fields are blanks or not but incase if someone press spacebar in new password and retype new password fields then it accept it . Now I want to block if someone try to press spacebar in new password cases.........please help to solve this error.......
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,478
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Change PAssword

 
0
  #2
Dec 1st, 2008
  1. <form method='post'>
  2. Username: <input type='text' value='' name='user'><br>
  3. Password: <input type='text' value='' name='password'><br>
  4. </form>
Well there are 2 main easy ways that you can do the activation process. Assuming above is the form you allready have, then if you just want to check there is only a space used or no password at all then the below lines of code will work:
  1. <?
  2. if ($_POST['password']!==' ' && strlen($_POST['password'])>0 && isset($_POST['password']))
  3. {
  4. //activate account
  5. }
  6. ?>

Or you could just set a minimum password length of something like 8 letters/numbers/characters which is done like the following:
  1. <?
  2. $minimum_length=8;
  3. if (strlen($_POST['password'])>=$minimum_length && isset($_POST['password']))
  4. {
  5. //activate account
  6. }
  7. ?>
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 64
Reputation: nil_gh_80 is an unknown quantity at this point 
Solved Threads: 0
nil_gh_80's Avatar
nil_gh_80 nil_gh_80 is offline Offline
Junior Poster in Training

Re: Change PAssword

 
0
  #3
Dec 1st, 2008
Someone plzzzzzzzzz reply.................
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 64
Reputation: nil_gh_80 is an unknown quantity at this point 
Solved Threads: 0
nil_gh_80's Avatar
nil_gh_80 nil_gh_80 is offline Offline
Junior Poster in Training

Re: Change PAssword

 
0
  #4
Dec 1st, 2008
Thanks man it works........
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC