O'Reilly logo

PHP Advanced for the World Wide Web: Visual QuickPro Guide by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mcrypt

There are security problems with almost any Web application you develop and the simple registration form created so far is no exception. It does use HTML, JavaScript, and PHP to check the user-submitted data and it protects the user's password by encrypting it, but there is still one major concern: the user's personal data—first and last names, email address, and birthday—are stored unencrypted in a readable text file.

One solution might be to use the crypt() function to encrypt this information before storing it. However, the crypt() function has no decrypt() counterpart you could use to turn the encoded data back into readable form. Storing an encrypted email address that you could not decrypt serves no purpose at all.

It would be preferable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required