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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:04:22+00:00 2026-05-23T20:04:22+00:00

I have Some Passwords which contain some special and methimatical chracters like this password

  • 0

I have Some Passwords which contain some special and methimatical chracters like this password “HHE1134ƒ” if i want to generate password with php md5() then this not give me correct hashes like this “679b6dc6122a9c83ed31476ee82af36e”.

So i have Java Script which can generate correct hash for my passwords
But how can i store this value to mysql

my code is given below please Help Me.

$result = mysql_query("SELECT * FROM `table`") or die(mysql_error());

while ($row = mysql_fetch_assoc($result))
{

$user_id = $row['user_id'];
$firstname = $row['firstname'];
$lastname = $row['lastname'];
$spno = $row['spno'];
$password = $row['password'];

$tmp =  "<script type='text/javascript'> document.write(MD5('".$password."'));</script>";

$query1="UPDATE `wp_110504users` SET `user_pass` = '$tmp' WHERE `user_login` = '$user_id'";

mysql_query($query1) or die(mysql_error());
}

this will give me error like

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'text/javascript'> document.write(MD5('HW72'));' WHERE `user_login` = '0' at line 1

?>

Some one tell me use Ajax, Please tell me how can i use Ajax for this code can you give me an example …..

  • 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-23T20:04:22+00:00Added an answer on May 23, 2026 at 8:04 pm

    The premise of your question is fundamentally flawed.

    if i want to generate password with php md5() then this not give me correct hashes

    I find it very hard to believe that PHP’s md5 function is not generating md5 hashes.

    You’re also very confused about what runs on the browser and what runs on the client.

    So i have Java Script which can generate correct hash for my passwords

    So you have a javascript function which produces some output which you consider valid. The corresponding PHP function does not produce output you consider valid. I presume that means you have some reference implementation which produces the same results as the Javascript – but you’ve provided no details of what this is.

    Or do you mean that your Javascript function is your reference implementation – if so, please bang your head on the desk a few times, then go get a copy of a javascript implementation of md5 which works properly

    Once you’ve done that, spend some time thinking about why, regardless of whether the hash function generates the expected output, generating a hash of a password (rather than a salted hash of a salted hash) on the client is a complete waste of time.

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

Sidebar

Related Questions

I have one password text box which requirement is some thing like: Should start
i have some text file which contain proxy ip . which look like following
I have some troubles with positioning my label/password field. With this code they both
I have a custom membership provider which looks like this: public class PMembershipProvider :
I have a pssword variable where it contains the user's password which contains some
I have a database table for users which contains common fields like password, email
I have to handle some sensitive data in my application, such as passwords, credit
SO buddies, greetings. I have some password requirements I need to implement and one
I have a game service, some of my gamerooms are password protected. In the
I have some arbitrary pixel data that I want to save as a PNG.

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.