Xuxa, please justify yourself properly with examples - what makes my code "ripped"? I paid a coder to make this for me! You are accusing me of copying to code!!!
Agreed. I've had a look at the code and I can't say that they are the same either. Breaking them down and to name one of the many differences:
- The AuthClass from Sam instantiates the DB in the constructor, in the case of the cited code (by xuxa) the db link is externally passed.
- Sessions are handled discretely in separate functions in Sam's code, that is not the case in the cited code.
- There is discrete redirect handling in xuxa's cited code, no such case case for Sam's.
...
For the experienced PHP coders reading this, you'd realize that this is only a case of both coders following known industry standards of using session handling and db auth, with password hashing. All because both coders decided to resort to the standards (and frankly I find that both coders did a good job) shouldn't mean that code was 'copied'.
SHA is better, less chance of being brocken through brute force. Yet you could easy have a encryption key (word) that you append to the end of say the passwords and then md5hash it. Then when you compare a login to the database entry you just append again as the word wont change and then hash.
That makes it alot harder as they wont be able to use a dictionary and would need to know the key.