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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:09:41+00:00 2026-06-10T09:09:41+00:00

Hello This is my current code I’m working on: $uname = unholybanana; $pass =

  • 0

Hello This is my current code I’m working on:

$uname = "unholybanana";
$pass = "choykiller13";
$salt = salty();
$password = sha1 ( $uname . $pass . $salt );
echo $password;

function salty() {
    mt_srand(microtime(true)*100000 + memory_get_usage(true));
    return md5(uniqid(mt_rand(), true));
}

So far my problem is $password echos $uname+$pass hashed mixed but it doesn’t mix with salt anyone can point out a problem with this. I’m currently just using sha1 for learning purposes rather than go straight to scrypt and bcrypt. Also this is what would i do to insert the data into the db:

    $sql= "INERT into test SET uname='$uname', hashpass='$password', salt='$salt'";

Would be great if anyone can spot if there is a problem with my insert above.

So far i have no idea how am i able to validate this.(syntax) would appreciate anyone would point me in a good direction.

But i think it should be still thinking how i would go about coding this.

     $checkpass= sha1 ( $uname . $pass . $salt ) == $hashpass;

Also i wanted to add $uname because all of my unames are given to the client so all unames would look like this C-9183102.

Would appreciate any help thanks!

  • 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-10T09:09:42+00:00Added an answer on June 10, 2026 at 9:09 am

    You almost definitely want

    $sql= "INSERT into test SET uname='$uname', hashpass='$password', salt='$salt'";
    

    instead of INERT.

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

Sidebar

Related Questions

My current code is this $swift = email::connect(); $swift->setSubject('hello') ->setFrom(array('alex@example.com.au' => 'Alex')) ->setTo(array('alex@example.com.au' =>
I am producing a hashed value of a password with salt.My code: `String psw=hello;
I got the code below how do I pass the current object this into
Hello this is code snippet which i get from Jquery Ajax based search I
This is my current code: $result = mysql_query(SELECT * FROM characters WHERE namn =
In my current company, we have this decade old...let's call it a Hello World
Based on my current understanding of hashes in Perl, I would expect this code
Let's say I have this code: <p dataname=description> Hello this is a description. <a
Hello I am using Code::Blocks in Windows XP. When I am running this program
This is my first program I really created besides hello world. The code is

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.