$query = "SELECT username, password FROM adminprofile WHERE username='$u' AND password=SHA('$p')";

Just wanted to know what is the function of SHA in the code above. I took this from a book and they don't have an explanation for that particular part. Please help.

Basically, SHA1, md5, password, encrypt, etc are the encrypting functions. If you encrypt a password field, your application will be more secure. That's all.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.