Storing Social Security Number in MySql

Using PHP and MySql and Dreamweaver CS5

I have a simple online multipage form passing variables via $_SESSION. Pages are using SSL. The only sensitive data is the guests Social Security Number. The form data is being inserted into the table. What is the best way (considering complexity) to encrypt the number in the database? I've used something dealing with a Salt or something before, I will be researching that next.
LVL 16
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use the AES_ENCRYPT in MySQL to store them. That's considering that you might want to decrypt that number in the future. If you want a one way encryption solution, then go for a SHA2 hash function. Check link below:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Does this item need to be displayed or just captured? Hashing at the page level rather than the database level lets you transmit data encrypted, rather than sending and receiving unencrypted data from the database. Lots of good programmers use this for passwords, so they are not sent unencrypted.
This is an SSL site overcourse?
rbudjAuthor Commented:
Thanks. I AM using SSL but the database itself needs to be encrypted. I'm looking further into incorporating AES_ENCRYPT. Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.