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

  • Home
  • SEARCH
  • 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 8670415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:42:08+00:00 2026-06-12T18:42:08+00:00

How can I use Bcrypt in my .php files? This is how I would

  • 0

How can I use Bcrypt in my .php files?

This is how I would set this up and correct me if I am wrong

I have looked over the info at the following link. How do you use bcrypt for hashing passwords in PHP?

If I understand this correctly
I would take the function list and place that into a .php file. Then on my main program I would use something like: $isGood = $bcrypt->verify('password', $hash); Which my encrypted password is now a variable of $isGood.

$isGood is what I want to store into the database? correct?

How do I set up my database?

What is my field type? Do I just leave it blank? or label it as text? How do I set up the DataBase to store this type of passwor? I know I wouldn’t use md5 or sha1 as the field type, because that will just encrypted it even more, or do I?

  • 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-12T18:42:10+00:00Added an answer on June 12, 2026 at 6:42 pm

    According to the example provided $isGood would be either true or false, not the password. As for your database, you should use binary(60) for the field type

    Basically what you’re trying to accomplish is storing the password encrypted in the database. Since the same string will always hash to the same value(be careful of newlines) you can then check the hash of the user input against what is in you database. This is what the verify() method is doing in your example. Then if verify return true you can proceed, otherwise the password is wrong.

    I just recently set something like this up PM is you have anymore questions.

    EDIT

    After reading this again I think I should remind you to always follow these guidelines when asking a question Specifically please post actual examples of code in the future as this will help make your question more relevant to other people. Aloha.

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

Sidebar

Related Questions

I can use the following code for tiny little queries: DECLARE @sql VARCHAR(8000) SET
I can use Server[request_time] to get current timestamp. But how would I use this
I can use the following to get the contents of a folder with no
I can use this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
In this question: Can someone explain how BCrypt verifies a hash? Ian Boyd writes
I would like to use bcrypt to hash passwords and later verify if a
Can i use php to convert video file to .flv or .swf file ...
I can use this, to find all instances of fly and replace it with
Can one use mod_pagespeed with tomcat application server? directly or indirectly? Am i correct
Possible Duplicate: How do you use bcrypt for hashing passwords in PHP? I am

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.