Hello Every One !

How to show md5() password from MySql table in PHP,
I have saved my user's password as ,

$password = md5($_POST['password']);
$save = mysql_query("INSERT into users(password) VALUES ($password)");

Its encrypting nice and works fine when user logs in , that's not a problem,
my question is how to show that encrypted password as original text from MySql in PHP ?

Any Suggestion ?

Member Avatar for diafol

Why do you want to do this? The whole point of that is that nobody gets to see it.

All you can do is store plain text password as separate field in database and display password from that field...

Like

password varchar(100),original_password varchar(100)

store posted password in original_password.

But remember its not a better way. but for now i think its one solution.

Thanks for you reply guys, I want to encrypt one string and decrypt that to original text for other security reason . So i decide to use md5() . Now i created my own algorithm . Thank You For Spend Time For Me.

Member Avatar for diafol

I want to encrypt one string and decrypt that to original text for other security reason

You can't decrypt a one-way hash like md5 (well, not without a rainbow table and a lot of time on your hands). You created you own algorithm using md5? I doubt it.

Yes ofcourse ardav, I created own (); for that . If you have doubt means create your own . Doubt will be clear.!

Member Avatar for diafol

Sorry M I didn't mean to sound so rude BUT I cannot see how yyou've created an algotithm to dehash md5

Hi aardav ! I havn't used the md5 for that . Thank you.. Now the problem is cleared . And i have another doubt . How to send mails to users every 24 hours . Do u have any idea ? dnt include CRON , Is there any way to create our own ?

Member Avatar for diafol

OK, start another thread as you won't get any help on that when using a different thread title and a solved status. Ensure that you search the forum thoroughly first, as this question comes up often. There will be hundreds of solutions in the php forum.

(You can run a cron job to do almost anything)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.