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

The Archive Base Latest Questions

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

I have $salt = md5(mt_rand()); $hashed = hash_hmac(‘SHA256’, $password, $salt); $stmt = self::$_dbh->prepare(‘INSERT INTO

  • 0

I have

$salt = md5(mt_rand());
$hashed = hash_hmac('SHA256', $password, $salt);
$stmt = self::$_dbh->prepare('INSERT INTO users (username, password, salt, display, email) VALUES (:username, :password, :salt, :display, :email)');
$stmt->bindParam('username', $username);
$stmt->bindParam('password', $hashed);
$stmt->bindParam('salt', $salt);
$stmt->bindParam('display', $display);
$stmt->bindParam('email', $email);
$stmt->execute();
$firephp->log('Insert OK ');
if ($stmt->rowCount() > 0) {
    return array(
            'status' => 'OK',
            'message' => 'Registration Successful'
    );
} 
$firephp->log('Unknown ... Row count: ' . $stmt->rowCount());
return array(
        'status' => 'failed',
        'message' => 'Something went wrong with the registration ... Please try again ...'
);

I always gets “Something went wrong with the registration … Please try again …”. It appears rowCount is 0. True enough, it does not insert into database. Why is that?

  • 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-23T00:45:41+00:00Added an answer on May 23, 2026 at 12:45 am

    Try:

     $firephp->log(
           $stmt->debugDumpParams()
           . "\n"
           . var_export($stmt->errorInfo());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a long function, as seen below: hash_correct = hashlib.md5(salt + password)).digest().encode(base64) I'd
Which query is more EXTRA secure? I have even heard salt(); and md5(); in
re question non-random-salt-for-password-hashes Mr Potato Head states that the use of md5 instead of
Assuming we have a salt that's in the database and that has been generated
At the moment I have a database with md5 passwords stored, a few years
UPDATE: RESPONSE FOUND AT: http://community.invisionpower.com/tracker/issue-21634-md5-once-password-does-not-decode-html-entities/ I want to make a separated page using my
I want to store a (random) salt next to the password in the database.
Could you please advise me some easy algorithm for hashing user password by MD5,
I have been reading up on password hashing, but all the forums I read
This following query returned null. SELECT `email`, `password`, `salt` FROM `users` WHERE `password` =

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.