Change a user password with php? need help!

7 posts Page 1 of 1
Contributors
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

I know how to update normal data in a MySQL table but not how to change a user password.
can someone explain?
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Sorry for the late reply, perhaps this could help: http://www.plus2net.com/php_tutorial/ph ... ssword.php

Hope it does ;)

-Comathi-
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Even if Comathi's post did help you should try and elaborate more if you want help & maybe even tell us the database structure if you wanted to do it via script.
Image
User avatar
rocky4126
VIP - Donator
VIP - Donator
Posts: 258
Joined: Mon Nov 16, 2009 7:39 pm

a simple "UPDATE `{table_name}` SET `{col1}` = '{val1}' AND `{col2}` = '{val2}'" should work for you.
Image
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Code: Select all
mysql_query("UPDATE `table` SET `password`='".$_POST['password']."' WHERE `username`='".$_POST['username']."'");
Well If topic is bumped, then ok
Last edited by Filip on Tue Jan 01, 2013 8:06 pm, edited 1 time in total.
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
rocky4126
VIP - Donator
VIP - Donator
Posts: 258
Joined: Mon Nov 16, 2009 7:39 pm

Filip, you missed a ' after ['password']." ;)
Image
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

rocky4126 wrote:
Filip, you missed a ' after ['password']." ;)
Thanks for pointing that out, fixed..
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
7 posts Page 1 of 1
Return to “Help & Support”