Search
Left Quote    Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.
- Clifford Stoll    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: min/max password length - member system
  This user is offline  lingh0e
  Subject: "min/max password length - member sy..." Posted: @ 3:02 am on Mar 03 2007   

Member #: 291
Rank: User - (29)
Since: 03/03/07
Posts: 29
From: Ohio

I am a relative newb to PHP and SQL, so please bear with me.

I got the entire member system set up, and I am trying to limit user passwords to a maximum of 8 characters.

I tried to modify the length in the user_password field on my members table to 8, it ended up trimming the md5 hash to 8 characters screwing up any login attempts (I suppose I should have assumed that would be the outcome, but to my credit I figured out the problem right away and fixed it).

So now I am assuming I have to put the length requirement in the registration page script in the same line as

Code:
if(strlen($_PO ST['password']) < 6 ) {
die('Error: Your password is too short. Must be 6 or more characters in length.');



Is this correct? And if so, what would be the proper syntax?

Thanks for the help,
Steve


Feel free to kick me if I get annoying
    Viewed: 5,635 Times | Reply to This | To top
  This user is offline  lingh0e
  Subject: "re: min/max password length - membe..." Posted: @ 3:18 am on Mar 03 2007    

Member #: 291
Rank: User - (29)
Since: 03/03/07
Posts: 29
From: Ohio

nevermind... I figured it out.

and I feel stupid for even asking in the first place.




Feel free to kick me if I get annoying

    Viewed: 5,628 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: min/max password length - membe..." Posted: @ 4:25 am on Mar 03 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Glad you figured it out; let me know if I can help with anything else. Good luck




-bs0d | AllSyntax.com

    Viewed: 5,622 Times | Reply to This | To top
  This user is offline  lingh0e
  Subject: "re: min/max password length - membe..." Posted: @ 4:48 am on Mar 03 2007    

Member #: 291
Rank: User - (29)
Since: 03/03/07
Posts: 29
From: Ohio

I do have other questions about how to further customize this into my site, but I think I should hit some books first and see if I can just teach myself.

I'm going to have to do some reading on SQL and how I can use the info stored in the table above and beyond the basic abilities you have demonstrated here.

Either way, thank you very much for this wonderful script. It is just the kind of stepping stone I needed to get a good start on the things I have in mind.




Feel free to kick me if I get annoying

    Viewed: 5,617 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank