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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:13:40+00:00 2026-06-10T01:13:40+00:00

I have the registration system on my website set up to where when the

  • 0

I have the registration system on my website set up to where when the user signs up the password is an md5’d mixture of the email and password that they signed up with. Unfortunately, I can’t get it to work properly. Here’s the code:

On Signup:

$user = strip_tags(substr($_POST['email'],0,32));
$pass = strip_tags(substr($_POST['password'],0,32));
$cleanPass = crypt(md5($pass),md5($user));
$date = time();

$stmt = $db->prepare("INSERT INTO users (password, email, first, last, date)
        VALUES(:password, :email, :first, :last, :date)");

On Sign in:

$email = $_POST['email'];
$user = strip_tags(substr($_POST['email'],0,32));
$pass = strip_tags(substr($_POST['password'],0,32));        

$cleanPass = crypt(md5($pass),md5($user));

$stmt = $db->prepare("SELECT email,password FROM users WHERE email=:email AND password=:password limit 1");
  • 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-10T01:13:41+00:00Added an answer on June 10, 2026 at 1:13 am

    If you want to use a combo of user/pass when storing the data, what you might wanna conisder is the length of the crypting mechanism. Normally when you do that you don’t crypt the 2 md5’s of the user&pass, but instead you do something like

    $cleanPass = md5( $user.$pass );
    

    If you also want to store the user, you shouldn’t md5 that. If you want to store the pass, md5 it.

    Does this help ?

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

Sidebar

Related Questions

I have an existing php website with a user system already set up (registration,
I have a registration system on my website which uses the common activation email
We have a big portal that needs user registration to allow them use its
I have a website, with a user system. I want to integrate wordpress's user
I have a registration form for a website that needs to check if an
I have created a registration system that uses AJAX to process the form so
We have a registration-type system that sends a confirmation e-mail once completed. The system
I have a system (let's call it System A) that allows the user to
We have a registration system Database and basically what this query does is check
I am wondering how to do the following... I have a registration system. When

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.