Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7872267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:09:16+00:00 2026-06-03T02:09:16+00:00

What is the best way to store sensitive data (eg: credit cards)? I need

  • 0

What is the best way to store sensitive data (eg: credit cards)? I need to be able to get the original text, so I can’t hash it. I have a few ideas.

  1. Use MySQL with AES_ENCRYPT() and AES_DECRYPT()

  2. Store it encrypted in a file using fwrite()

Now I know that MySQL’s encrypt and decrypt functions aren’t secure, is there any encryption that I can use in PHP that is easy, fast and secure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:09:18+00:00Added an answer on June 3, 2026 at 2:09 am

    Don’t store credit card numbers on your server! Having this information in your database makes you an extremely attractive target for hackers. And if you think you can protect it, think again. Hackers have defeated the security of companies with excellent security. Your security won’t be any better.

    Your best bet is to use a service like Authorize.Net’s Customer Information Manager (CIM) which allows you to create payment profiles on their server (i.e. they store the information) and then you charge against it. That way you can charge your customer whenever you need to but don’t have to store their credit card information.

    If you insist on doing it yourself you have to follow the PCI rules outlined in this guide. But you may find this guide easier to understand. Go to page 14 for what you need to know. Basically you can store it but it has to be encrypted according to PCI standards.

    FYI, Your server and network also must be secure. If any piece of the puzzle is not PCI compliant you cannot store the credit card numbers. That rules out most shared hosting companies as a solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the best way to store data on the server, that can be
What is the best way to store string data across postback. I need to
What is the best way to store and handle sensitive information with puppet and
What is the best way to store data that is dynamic in nature using
What's the best way to store this data in a Java enum? <select> <option></option>
What is the best way to store a data set locally on a mobile
What is the best way to store data for the iPhone? I will be
What's the best way to store language data? Keep it as variables in some
What is the best way to store long text in a database that will
What's the best way to store a key=>value array in javascript, and how can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.