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 3633606
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:40:27+00:00 2026-05-19T00:40:27+00:00

I want to make a table. My users give me their email address, this

  • 0

I want to make a table. My users give me their email address, this is then stored in the database. Should they ever require their login details to be resent to them, they can enter this email address, it will be checked in the system to see if it exists, if it does, an email will be sent to them with their login details.

What database structure is best for this?

What is the best way to store the emails that is not visible to everyone who hacks into the database? bearing in mind I will only check another value against the database and never require the actual email address stored as output?

  • 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-05-19T00:40:28+00:00Added an answer on May 19, 2026 at 12:40 am

    If you just need to check if the e-mail is in the system, you should probably store a hash of some sort (MD5 or SHA, both of which MySQL supports natively) instead of the actual e-mail address. A hash is a one-way encryption, which means you can’t retrieve the e-mail address from the converted hash text, but you can recreate the hash from the e-mail address.

    There’s a good discussion of how to store SHA1 strings in MySQL here:
    Storing SHA1 hash values in MySQL

    If your table looks something like this:

    userid: INT
    emailhash: CHAR(40)
    

    You could check if the e-mail address exists with a query like this:

    SELECT userid FROM tablename WHERE SHA1([e-mail address from user]) = emailhash;
    

    If it returns a result, then you know the userid that matches the e-mail address and you can send an e-mail to the e-mail address you collected from the user. (Remember, you won’t be able to retrieve the e-mail address from your database.)

    There are more notes on MySQL’s encryption algorithms here:
    http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html

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

Sidebar

Related Questions

I want to make a web-UI where users can enter a table name and
I want to make a table where the entries expire 24 hours after they
I want to make custom select from the database table using Linq. We use
I want to make a table view in my iPhone Application.. In that table
I want to make an hibernate querycount on a table. I have to values,
I want to make sure I'm not inserting a duplicate row into my table
I have a table : tags(tagname,entryid,stamp) and i want to make a section for
I want to make two tables on single screen, so that if Table A
I have a table A with a date field. I want to make a
I have a table with primary key (ColumnA, ColumnB). I want to make a

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.